Commit 6e30622
committed
Merge #143: refactors to prepare for the new rust-simplicity version
760c51c move ProgNode into compile.rs as a private type (Andrew Poelstra)
142e63c move builtins from crate root to private module in compile (Andrew Poelstra)
cbf7ce6 rename src/compile.rs to src/compile/mod.rs (Andrew Poelstra)
7f1d12a move type checking from lib.rs into compile.rs (Andrew Poelstra)
5fce3d4 replace Construct with Commit in CompiledProgram (Andrew Poelstra)
6d864bb named: add finalize_types function (Andrew Poelstra)
7150f0e named: replace ad-hoc ConstructNode/CommitNode/WitnessNode with generic ones (Andrew Poelstra)
60f65b4 remove Default impl from CompiledProgram (Andrew Poelstra)
Pull request description:
Since BlockstreamResearch/rust-simplicity#305 we are not allowed to have type inference contexts (and therefore `ConstructNode`s) that escape the lexical scope that defines them.
We currently use `ConstructNode` inside `ProgramNode`. This PR changes this to `CommitNode`, which is more correct, as well as being necessary to avoid exposing bad `GhostCell` ergonomics to users of this library.
ACKs for top commit:
delta1:
ACK 760c51c
Tree-SHA512: 15d99c72c262ec88e873fb4e3cc6025c1ecf4ec848b22f4b45fb8e5f40c98d5aea3421f1fbd0f3d68f83fc04797495e1665d71d4d1b5b11b4b94c5c088df451b5 files changed
Lines changed: 219 additions & 207 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | | - | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
261 | | - | |
| 265 | + | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
267 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
268 | 277 | | |
269 | 278 | | |
270 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | 103 | | |
115 | 104 | | |
116 | 105 | | |
| |||
134 | 123 | | |
135 | 124 | | |
136 | 125 | | |
137 | | - | |
138 | | - | |
| 126 | + | |
139 | 127 | | |
140 | 128 | | |
141 | 129 | | |
| |||
163 | 151 | | |
164 | 152 | | |
165 | 153 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
171 | 159 | | |
172 | | - | |
| 160 | + | |
173 | 161 | | |
174 | 162 | | |
175 | 163 | | |
| |||
0 commit comments