Commit 0682209
authored
Deterministic printing of IR values (#7490)
Closes #4517
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> IR printer now generates deterministic value IDs; tests and IR harness
updated to match new naming and ensure stable round-trips.
>
> - **IR Printer**:
> - Deterministic value naming via stable keys (`v{:?}` from
`value.0.data()`); added `slotmap::Key` import.
> - **Tests/Fixtures**:
> - Switch FileCheck regex to `VAL=v\d+v\d+` and update expectations
across IR tests/snapshots to new value IDs.
> - Tweak const-folding tests to expect `const ...` lines without
temporary names.
> - **IR Test Harness**:
> - Update default regex definitions; verify determinism by
parsing/printing twice and comparing outputs.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cfad08d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 54e0169 commit 0682209
File tree
64 files changed
+1959
-1918
lines changed- sway-ir
- src
- optimize
- tests
- constants
- cse
- dce
- demote_misc
- inline
- mem2reg
- memcpyopt
- serialize
- test/src
- e2e_vm_tests/test_programs/should_pass/language
- array/array_repeat
- configurable_dedup_decode
- intrinsics/transmute
- logging
- main_args
- main_args_empty
- main_args_one_u64
- main_args_two_u64
- main_args_various_types
- panic_expression/panic_const_eval_string_slices_not_in_bytecode
- ir_generation
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
64 files changed
+1959
-1918
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | | - | |
500 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
1401 | 1402 | | |
1402 | 1403 | | |
1403 | 1404 | | |
1404 | | - | |
| 1405 | + | |
1405 | 1406 | | |
1406 | 1407 | | |
1407 | 1408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
0 commit comments