docs: Phase 260 P0.3 完了記録 + 既知FAIL SSOT更新
**10-Now.md 更新**: - Phase 260 P0.2/P0.3 完了記録追加(15モジュール、約3941行、53単体テスト) - Current First FAIL を "P0.3完了後" に更新 - 既知FAILに "Phase 260 scope外" を明記 - 期待/実際の詳細追加 - 次アクション: 機能側Phase(Pattern2 LoopBodyLocal promotion)へ **phase-260/README.md 更新**: - Status: P0.3 完了 ✅ - P0.2/P0.3 進捗セクション追加(commit履歴、成果) - モジュール分割の責務一覧(Utilities 7 + Handlers 8) - SSOT維持確認項目(jump_args直参照ゼロ、out_edges()/edge_args_to() SSOT維持、PHI preservation、Phase metadata保持) Phase 260 完全達成: CFG基盤整備完了、今後は機能側Phaseへ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Phase 260: Block-Parameterized CFG(edge-args)段階導入
|
||||
|
||||
Status: In progress
|
||||
Last updated: 2025-12-20
|
||||
Status: P0.3 完了 ✅
|
||||
Last updated: 2025-12-21
|
||||
|
||||
## 進捗(セーブポイント)
|
||||
|
||||
@ -9,6 +9,46 @@ Last updated: 2025-12-20
|
||||
- Commit: `4dfe3349b`
|
||||
- P0.1(hardening): 完了(legacy layout 無し禁止 + DCE/verify の参照点整理)
|
||||
- Commit: `1fe5be347`
|
||||
- P0.2(instruction_rewriter モジュール化): 完了
|
||||
- Commits: `cbed040a7`, `aa3fdf3c1`, `c2e8099ff`, `84cd653ae`, `875bfee1b`, `666de9d3e`
|
||||
- 抽出モジュール: exit_collection, block_allocator, merge_variable_handler, call_generator, handlers/(8ファイル)
|
||||
- P0.3(joinir_block_converter モジュール化): 完了 ✅
|
||||
- Commits: `e7f9adcfe`, `2c01a7335`
|
||||
- Phase 1: terminator_builder, block_finalizer
|
||||
- Phase 2: handlers/(call, jump, conditional_method_call, if_merge, nested_if_merge)
|
||||
- **合計抽出**: 15モジュール、約3941行、53単体テスト全てpass
|
||||
- **統合テスト**: 45/46 pass(既知のPattern2 LoopBodyLocal問題1件のみ)
|
||||
|
||||
## P0.2/P0.3 モジュール分割の責務一覧
|
||||
|
||||
### Utilities(7モジュール)
|
||||
- **block_allocator.rs**: ブロックID割り当て統一(allocate_one/two/three/n)
|
||||
- **merge_variable_handler.rs**: マージコピー生成(emit_merge_copies, MergeBranch)
|
||||
- **call_generator.rs**: Call命令生成統一(emit_call_pair, emit_call_pair_with_spans)
|
||||
- **terminator_builder.rs**: Terminator生成統一(create_branch/jump/return_terminator, emit_branch_and_finalize)
|
||||
- **block_finalizer.rs**: PHI保持ブロック確定(finalize_block, finalize_remaining_instructions)
|
||||
- **exit_collection.rs**: Exit値収集(collect_exit_values, ExitCollectionResult)
|
||||
- **convert.rs**: MirLikeInst変換(convert_mir_like_inst)
|
||||
|
||||
### Handlers(8モジュール)
|
||||
- **handlers/ret.rs**: Return処理
|
||||
- **handlers/method_call.rs**: MethodCall → BoxCall変換
|
||||
- **handlers/field_access.rs**: FieldAccess → BoxCall(getter pattern)
|
||||
- **handlers/new_box.rs**: NewBox命令処理
|
||||
- **handlers/select.rs**: Select命令(直接、展開なし)
|
||||
- **handlers/call.rs**: Call + tail call処理(Phase 131 P2: 安定ValueId、legacy jump_args)
|
||||
- **handlers/jump.rs**: Jump → tail call変換(Phase 256 P1.9: continuation、Phase 246-EX: legacy jump_args)
|
||||
- **handlers/conditional_method_call.rs**: ConditionalMethodCall → if/phi展開(単一変数)
|
||||
- **handlers/if_merge.rs**: IfMerge → if/phi(複数変数)
|
||||
- **handlers/nested_if_merge.rs**: NestedIfMerge → 多段分岐(N+3ブロック、最複雑)
|
||||
|
||||
### SSOT維持の確認項目(Phase 260の契約)
|
||||
|
||||
✅ **jump_args直参照ゼロ維持**: 全モジュールで`BasicBlock.jump_args`への直接参照なし(`out_edges()`/`edge_args_to()`経由のみ)
|
||||
✅ **out_edges()/edge_args_to() SSOT維持**: 読む側APIが単一参照点に統一(Branchを含む複数edge前提)
|
||||
✅ **terminator operand優先**: 新規コードはterminator operandを優先的に使用(legacy jump_argsは併存のみ)
|
||||
✅ **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名前解決)の契約を全て保持
|
||||
|
||||
## 目的(P0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user