Commit 10a3728
authored
fix(printer): record closure Ty in type table after instance traversal (#129)
### Summary
- In `TyCollector::visit_ty` (`src/printer.rs`), after successful
closure instance traversal, record closure `Ty` metadata in `types`.
- Update integration golden files
(`tests/integration/programs/*.smir.json.expected`) to match emitted
closure `FunType` metadata.
- Keep `Makefile` integration path as
`TESTDIR=tests/integration/programs` to keep closure fixture output
paths stable.
### Context
In the closure arm of `TyCollector::visit_ty`, the code resolved and
visited the closure instance but returned without inserting the closure
`Ty` into `types`. Other type families were inserted; closures were the
exception.
This made downstream closure type lookup incomplete (notably for kmir
proof paths that consume exported type metadata). Recording closure `Ty`
closes that gap.
Related split: static/vtable alloc fallback changes were moved out to
[stable-mir-json#131](#131)
so this PR stays focused on closure metadata.
Dependency context: this PR is depended on by
[mir-semantics#957](runtimeverification/mir-semantics#957).1 parent 89b75f0 commit 10a3728
30 files changed
Lines changed: 161 additions & 5 deletions
File tree
- src/printer
- tests/integration/programs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5745 | 5745 | | |
5746 | 5746 | | |
5747 | 5747 | | |
| 5748 | + | |
| 5749 | + | |
| 5750 | + | |
| 5751 | + | |
| 5752 | + | |
5748 | 5753 | | |
5749 | 5754 | | |
5750 | 5755 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10113 | 10113 | | |
10114 | 10114 | | |
10115 | 10115 | | |
| 10116 | + | |
| 10117 | + | |
| 10118 | + | |
| 10119 | + | |
| 10120 | + | |
10116 | 10121 | | |
10117 | 10122 | | |
10118 | 10123 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2174 | 2174 | | |
2175 | 2175 | | |
2176 | 2176 | | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
2177 | 2182 | | |
2178 | 2183 | | |
2179 | 2184 | | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2612 | 2612 | | |
2613 | 2613 | | |
2614 | 2614 | | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
2615 | 2625 | | |
2616 | 2626 | | |
2617 | 2627 | | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
2310 | 2320 | | |
2311 | 2321 | | |
2312 | 2322 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2427 | 2427 | | |
2428 | 2428 | | |
2429 | 2429 | | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
2430 | 2435 | | |
2431 | 2436 | | |
2432 | 2437 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2528 | 2528 | | |
2529 | 2529 | | |
2530 | 2530 | | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
2531 | 2536 | | |
2532 | 2537 | | |
2533 | 2538 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2350 | 2350 | | |
2351 | 2351 | | |
2352 | 2352 | | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
2353 | 2358 | | |
2354 | 2359 | | |
2355 | 2360 | | |
0 commit comments