fix(joinir): Phase 283 P0 - Pattern3 Undefined ValueId Bug Fix

- Fix: extract_if_condition() moved after local_cond_env construction
  (loop_with_if_phi_if_sum.rs:175)
  - Root cause: condition extraction before i_param/sum_param creation
  - Result: i % 2 referenced caller's ConditionEnv with unmapped ValueId
- Fail-Fast: Add condition_bindings validation in merge (mod.rs)
- Fixture: Update loop_if_phi.hako for C2 compatibility (sum.toString())
- Verified: VM execution outputs sum=9 

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-23 08:14:27 +09:00
parent 32ccccd272
commit bfbc9b26bf
6 changed files with 114 additions and 31 deletions

View File

@ -8,12 +8,9 @@ Related:
## 直近JoinIR/selfhost
- **Phase 281planned: Pattern6 を compose へ段階吸収**
- 入口: `docs/development/current/main/phases/phase-281/README.md`
- P0Pattern7✅ 完了、次は P1Pattern6 early-exit
- **Phase 282planned: Router shrinkage**
- 目的: pattern番号を “症状ラベル” に縮退させ、合成SSOTへ寄せた後に router の分岐を減らす
- **Phase 282planned, design-first: Router shrinkage**
- 入口: `docs/development/current/main/phases/phase-282/README.md`
- 目的: pattern番号を “症状ラベル” に縮退し、router の責務を「抽出の配線」へ収束させる
(✅ done**Phase 279 P0**: Type propagation pipeline SSOT 統一lifecycle / JoinIR / LLVM の二重化解消)
- 完了: `docs/development/current/main/phases/phase-279/README.md`
@ -27,6 +24,12 @@ Related:
- (✅ done**Phase 273**: Plan line SSOTPattern6/7
- 完了: `docs/development/current/main/phases/phase-273/README.md`
- (✅ done**Phase 280**: Frag composition SSOT positioning
- 完了: `docs/development/current/main/phases/phase-280/README.md`
- (✅ done**Phase 281**: compose adoptionPattern6/7, P0P3
- 完了: `docs/development/current/main/phases/phase-281/README.md`
- (✅ done**Phase 277/278**: PHI strict + env var 収束
- 完了: `docs/development/current/main/phases/phase-277/README.md`
- 完了: `docs/development/current/main/phases/phase-278/README.md`