Found during PR #7171's IR-neutrality verification (macOS arm64, same-compiler control runs): emitted LLVM IR is nondeterministic when a method name is shared across classes — perry_method_<Class>__<name> symbols are emitted in HashMap iteration order, so two runs of the same compiler on the same source produce differently-ordered IR.
Observed on real dependency files: vite's module-runner.js and rollup's shared/index.js (the two corpus files excluded as control-failed in #7171's 47/0/2 IR comparison — reported honestly as control failures, not counted as passing).
Class
Same family as #7038/#7039 (closure-source HashMap iteration made @.str.N numbering a per-process permutation on macOS — fixed by sorting) and #7131 (Linux temp names — fixed). This is the method-emission sibling: cross-class shared method names iterate an unordered map.
Why it matters
Repro
Compile vite/dist/node/module-runner.js (or rollup shared/index.js) twice with the same compiler, --trace llvm or --no-link, diff the IR: method-symbol ordering differs run-to-run.
Found during PR #7171's IR-neutrality verification (macOS arm64, same-compiler control runs): emitted LLVM IR is nondeterministic when a method name is shared across classes —
perry_method_<Class>__<name>symbols are emitted in HashMap iteration order, so two runs of the same compiler on the same source produce differently-ordered IR.Observed on real dependency files:
vite'smodule-runner.jsandrollup'sshared/index.js(the two corpus files excluded ascontrol-failedin #7171's 47/0/2 IR comparison — reported honestly as control failures, not counted as passing).Class
Same family as #7038/#7039 (closure-source HashMap iteration made
@.str.Nnumbering a per-process permutation on macOS — fixed by sorting) and #7131 (Linux temp names — fixed). This is the method-emission sibling: cross-class shared method names iterate an unordered map.Why it matters
Repro
Compile
vite/dist/node/module-runner.js(or rollupshared/index.js) twice with the same compiler,--trace llvmor--no-link, diff the IR: method-symbol ordering differs run-to-run.