Commit d81e580
committed
test: canonicalize dk_version constant for cross-arch stability
ARM64 gate at 7a0c041 failed with diff:
- v61:CUInt32[37] = LoadConst<CUInt32[37]> (x86_64)
+ v61:CUInt32[46] = LoadConst<CUInt32[46]> (ARM64)
The CUInt32[N] constant is the `sys` module dict's `dk_version` —
a monotonic counter bumped on every dict-key mutation. The value
depends on how many key mutations happened during interpreter
startup, which is architecture- and import-order dependent
(x86_64 saw 37, ARM64 saw 46).
Add a regex that canonicalizes `CUInt32[N]` (the only specialized
type that can carry runtime dict-version state in the LoadAttr HIR).
CUInt64[N] (slot count) and CInt64[N] (key hash / index) encode
stable shape information from the class definition and are NOT
canonicalized — divergence in those values is a real regression
signal.
Regenerated docs/golden/loadattr_hir.txt with the updated rule.
Verified test PASSES on x86_64 at HEAD (run + verify cycle).
ARM64 verification pending re-gate.1 parent 7a0c041 commit d81e580
2 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
138 | 149 | | |
139 | 150 | | |
140 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
141 | 154 | | |
142 | 155 | | |
143 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
0 commit comments