docs: Phase 267 P0 EdgeCFG Branch (BranchStub + emit_frag)

This commit is contained in:
2025-12-21 20:33:24 +09:00
parent bd84fdf78f
commit 86a51cad2b
4 changed files with 72 additions and 0 deletions

View File

@ -145,6 +145,18 @@ Related:
- verify strict 版で段階導入を壊さない
- **次**: Phase 267 で JoinIR Pattern への適用
- **(✅ P0 完了Phase 267: BranchStub + emit_fragBranch の第一級化)**
- **目的**: Frag に Branch を第一級で追加し、wiresJump/Returnと同様に MIR terminator へ落とす入口を作る
- **完了内容P0**:
- `BranchStub` 追加 + `Frag.branches` 追加
- `compose::if_` が header→then/else の BranchStub を生成
- `emit_frag(function, frag)` を追加(`emit_wires` + `set_branch_with_edge_args`
- 1 block = 1 terminatorwire/branch の衝突)を Fail-Fast
- unit tests + `cargo test -p nyash-rust --lib` PASS
- **P1延期**:
- “層を跨がない実適用”は候補が抽象化層へ委譲済みのため、Phase 268 で体系的に適用する方針
- **詳細**: `docs/development/current/main/phases/phase-267/README.md`
- **real-app loop regression の横展開VM + LLVM EXE**
- ねらい: 実コード由来ループを 1 本ずつ最小抽出して fixture/smoke で固定する(段階投入)。
- 現状: Phase 107find_balanced_array/object / json_cur 由来)まで固定済み。