Files
hakorune/docs/development/current/main/phases/phase-113
nyash-codex 70fe0da549 docs: Phase 113 if-only partial assign parity
- Create phases/phase-113/README.md (background, fixed pattern, verification)
- Update 10-Now.md with Phase 113 completion
- Update 01-JoinIR-Selfhost-INDEX.md with Phase 113 entry

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 01:58:56 +09:00
..

Phase 113: if-only partial assign parity

Background

if-only (no else) で片側だけ代入がある場合、else 側では変数の元の値を「保持」する必要がある。 これは PHI ノードの incoming として、else 側に元の ValueId を渡す「保持 merge」パターン。

What is Fixed

  • x=1; if flag==1 { x=2 } print(x) パターン
  • flag=0 のとき x は 1 のままelse 側の暗黙保持)
  • flag=1 のとき x は 2 に更新

Verification

# VM
bash tools/smokes/v2/profiles/integration/apps/phase113_if_only_partial_assign_vm.sh

# LLVM EXE
bash tools/smokes/v2/profiles/integration/apps/phase113_if_only_partial_assign_llvm_exe.sh

Expected output: 1\n2