You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codegen is not run-to-run deterministic: string-constant numbering, function-name registration order, and method-callee selection permute #7622
Compiling the same source twice with the same perry binary produces different LLVM IR. Not a miscompile — the programs behave identically — but it defeats any byte-level IR A/B, which is the primary evidence a rooting-campaign slice offers (#7615).
with the matching permutation of js_register_function_name calls in __perry_init_strings_*_chunk0.
2. Method-callee selection permutes. In test_gap_class_expr_dynamic_parent_ctor, three consecutive dispatches swap which perry_method_* symbol each call site names:
Both smell like iteration over a HashMap/HashSet whose order is randomised per process.
Why it matters beyond tidiness
It masquerades as a regression. Comparing IR between two compilers is how the Layer 1 slices demonstrate "root plumbing only". In refactor(codegen): migrate arrays_finds.rs + array_methods.rs onto the Layer 1 rooting API (#7615) #7620 three of nine differing functions were this, not the change — distinguishable only because the instruction multiset was identical and a same-binary double compile reproduced the same permutation. A slice that used diff would have reported three phantom differences; one that used a multiset comparison and did not check determinism would have quietly dismissed a real ordering change.
Activity
refactor(codegen): migrate arrays_finds.rs + array_methods.rs onto th…
docs(changelog): fragment for #7622 codegen determinism (#7625)
fix(codegen): make emitted IR run-to-run deterministic (#7622) (#7625)