feat(joinir): Phase 246-EX Part 2 - Exit PHI & step scheduling fixes

Phase 246-EX Part 2 completes the _atoi JoinIR integration:

Key fixes:
- Exit PHI connection: ExitLineReconnector now correctly uses exit PHI dsts
- Jump args preservation: BasicBlock.jump_args field stores JoinIR exit values
- instruction_rewriter: Reads jump_args, remaps JoinIR→HOST values by carrier order
- step_schedule.rs: New module for body-local init step ordering

Files changed:
- reconnector.rs: Exit PHI connection improvements
- instruction_rewriter.rs: Jump args reading & carrier value mapping
- loop_with_break_minimal.rs: Refactored step scheduling
- step_schedule.rs: NEW - Step ordering logic extracted

Tests: 931/931 PASS (no regression)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-11 16:46:53 +09:00
parent e356524b0a
commit eb00d97fdb
16 changed files with 802 additions and 219 deletions

View File

@ -207,10 +207,10 @@ impl DigitPosPromoter {
// Integer carrier (loop-state, for NumberAccumulation)
let promoted_carrier_int = CarrierVar {
name: int_carrier_name.clone(),
host_id: ValueId(0), // Placeholder (will be remapped)
host_id: ValueId(0), // Placeholder (loop-local; no host slot)
join_id: None, // Will be allocated later
role: CarrierRole::LoopState, // Phase 247-EX: LoopState for accumulation
init: CarrierInit::FromHost, // Phase 228: Initialize from indexOf() result
init: CarrierInit::LoopLocalZero, // Derived in-loop carrier (no host binding)
};
// Create CarrierInfo with a dummy loop_var_name (will be ignored during merge)