docs: Phase 260 P2 完了記録 + EdgeCFG SSOT 確立
Update phase-260/README.md: - Status: P2 完了 ✅(EdgeCFG SSOT確立) - Add P2 completion record with test results - Add EdgeCFG SSOT definition (Jump/Branch: terminator SSOT, Return: metadata exception) - Document unified API (read/write separation) - Note Option B' trade-off (Return metadata exception) Update 10-Now.md: - Add Phase 260 P2 completion entry (2025-12-21) - Test results: 1368 lib tests, 45/46 smoke, phase258 tail call - Verification: 0 jump_args references (comments excluded) - 9 files modified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# Phase 260: Block-Parameterized CFG(edge-args)段階導入
|
||||
|
||||
Status: P0.3 完了 ✅
|
||||
Status: P2 完了 ✅(EdgeCFG SSOT確立)
|
||||
Last updated: 2025-12-21
|
||||
|
||||
## 進捗(セーブポイント)
|
||||
@ -18,6 +18,13 @@ Last updated: 2025-12-21
|
||||
- Phase 2: handlers/(call, jump, conditional_method_call, if_merge, nested_if_merge)
|
||||
- **合計抽出**: 15モジュール、約3941行、53単体テスト全てpass
|
||||
- **統合テスト**: 45/46 pass(既知のPattern2 LoopBodyLocal問題1件のみ)
|
||||
- **P2(削除): 完了 ✅**
|
||||
- **BasicBlock.jump_args 完全削除**、edge-args SSOT を terminator operand 側に一本化
|
||||
- フィールド変更: `jump_args` → `return_env`(Return専用metadata)
|
||||
- API簡略化: legacy helper 8個削除、terminator更新API保持(successors同期維持)
|
||||
- Verification簡素化: dual-source検証削除(cfg.rs 62行削除)
|
||||
- **テスト結果**: cargo test --lib 1368 PASS、quick smoke 45/46 PASS、phase258 tail call PASS
|
||||
- **検証**: `rg 'jump_args' src/` = 0件(コメント除く)
|
||||
|
||||
## P0.2/P0.3 モジュール分割の責務一覧
|
||||
|
||||
@ -50,6 +57,21 @@ Last updated: 2025-12-21
|
||||
✅ **PHI preservation**: block_finalizer.rsでPhase 189 FIX(PHI命令をブロック先頭保持)を維持
|
||||
✅ **Phase metadata保持**: Phase 131 P2(安定ValueId)、Phase 246-EX(legacy jump_args)、Phase 256 P1.9(continuation名前解決)の契約を全て保持
|
||||
|
||||
### EdgeCFG SSOT確立(P2完了後)
|
||||
|
||||
**Edge-args の SSOT定義**:
|
||||
- **Jump/Branch**: terminator operand `edge_args` が SSOT ✅
|
||||
- **Return**: metadata `return_env` が SSOT(例外、terminator に operand フィールドなし)⚠️
|
||||
|
||||
**統一API**:
|
||||
- **読み出し**: `out_edges()`, `edge_args_to()`, `edge_args_from_terminator()`
|
||||
- **書き込み**: `set_jump_with_edge_args()`, `set_branch_with_edge_args()`, `set_return_env()`
|
||||
- 直代入禁止(successors 同期漏れ防止、Phase 260/261の核心成果)
|
||||
|
||||
**妥協点の明記**:
|
||||
- Returnは「CFG successorを持たない」semantic上の特殊ケースのため、metadata許容
|
||||
- 理想形(Option A)はReturn terminatorにenvフィールド追加だが、P2では工数削減のためOption B'採用
|
||||
|
||||
## 目的(P0)
|
||||
|
||||
JoinIR→MIR の暗黙 ABI(jump_args / carriers / expr_result slot / successors)を減らし、将来的な **block-parameterized CFG**(edge-args を第一級に持つCFG)へ収束するための「大工事パート」を開始する。
|
||||
|
||||
Reference in New Issue
Block a user