Commit 38a0d44
Use dense FIR IDs across packages (#1296)
This change fixes three things:
- It reduces the memory footprint by using dense FIR IDs across
packages. This is accomplished by using a new lowerer instance for every
package such that IDs for blocks, statements, expressions and pats are
reset and start from zero.
- It fixes a bug where the debugger would not honor a breakpoint if the
statement that mapped to the breakpoint had the ID 0.
- As a consequence of changing the way the FIR lowerer is used, the
debugger would now randomly and inadvertently break into a core or
standard library statement if the statement ID happened to be the same
than the statement ID where a breakpoint is set in the user's code. This
problem is also addressed by this change.
This was done in collaboration with @swernli and @idavis.
---------
Co-authored-by: Stefan J. Wernli <[email protected]>1 parent 15c26c4 commit 38a0d44
File tree
8 files changed
+317
-330
lines changed- compiler
- qsc_codegen/src
- qsc_eval/src
- intrinsic
- qsc_rca/tests
- qsc
- benches
- src
- vscode/src/debugger
8 files changed
+317
-330
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | | - | |
| 140 | + | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 147 | + | |
152 | 148 | | |
153 | 149 | | |
154 | 150 | | |
155 | 151 | | |
156 | | - | |
| 152 | + | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | 148 | | |
152 | 149 | | |
153 | 150 | | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | | - | |
| 155 | + | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
163 | | - | |
164 | 161 | | |
165 | 162 | | |
166 | 163 | | |
167 | 164 | | |
168 | 165 | | |
169 | | - | |
| 166 | + | |
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | 149 | | |
151 | 150 | | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
| 163 | + | |
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
| |||
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
183 | | - | |
| 182 | + | |
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| 433 | + | |
432 | 434 | | |
433 | 435 | | |
434 | 436 | | |
| |||
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
550 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
551 | 556 | | |
552 | 557 | | |
553 | 558 | | |
| |||
0 commit comments