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
fix: Replace HashMap with IndexMap to ensure deterministic compilation
HashMap's random iteration order caused non-deterministic LLVM IR generation,
leading to phi nodes receiving incorrect values. While loops would sometimes
enter infinite loops because the phi node received a constant instead of the
computed value.
Changes:
- Convert all HashMap to IndexMap in HIR data structures (hir.rs)
- Update SSA builder to use IndexMap for deterministic phi node construction
- Fix LLVM backend to use IndexMap's insertion order instead of UUID-based sorting
- Add serde feature to indexmap dependency for serialization support
- Update all related files: hir_builder, optimization, async_support, lowering
The while loop test now consistently returns 10 across all runs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments