docs: Phase 263 P0 完了記録(Pattern2 fallback 修正)

- 10-Now.md: Phase 263 P0 完了記録を追加(最上部に配置)
- phase-263/README.md: 詳細な実装記録・検証結果を作成
- 30-Backlog.md: Phase 263+ planned 項目を追加
  - Pattern2 LoopBodyLocal promotion(seg)
  - PromoteDecision API hardening(構造で迷子防止)
- phase263_p0_pattern2_seg_vm.sh: smoke test スクリプト改善

検証結果:
- cargo test --lib: 1368/1368 PASS 
- quick smoke: 45/46 PASS  (大幅改善)
- Pattern2 が正しく abort することを確認
This commit is contained in:
2025-12-21 10:39:48 +09:00
parent 93022e7e10
commit e3dd1bbecb
4 changed files with 283 additions and 7 deletions

View File

@ -1,9 +1,23 @@
# Self Current Task — Now (main)
## 2025-12-21Phase 263 P0Pattern2 LoopBodyLocal fallback 修正)✅
- **Goal**: Pattern2 で処理できない LoopBodyLocal を検出したら Pattern2 全体を早期終了(部分的な処理続行は禁止)
- **修正内容**:
- `promote_step_box.rs`: 戻り値を `Result<Option<_>, String>` に変更、Reject を二分化(対象外 → Ok(None)、対象だが未対応 → Err
- `pattern2_lowering_orchestrator.rs`: Ok(None) 検出で早期 return
- Fail-Fast 原則: 対象外は Ok(None) で後続経路へ、対象だが未対応は Err で即座に失敗
- **検証結果**:
- cargo test --lib: **1368/1368 PASS** ✅ (1367→1368 に改善)
- quick smoke: **45/46 PASS** ✅ (大幅改善!)
- エラーメッセージ変化: `[cf_loop/pattern2] Variable not found: seg``[joinir/freeze] Loop lowering failed` (Pattern2 が正しく abort)
- **Commit**: `93022e7e1` - fix(pattern2): abort entire Pattern2 on unpromoted LoopBodyLocal instead of partial execution
- **詳細**: `docs/development/current/main/phases/phase-263/README.md`
## Next (planned)
- Phase 259: `StringUtils.is_integer/1`nested-if + loopを JoinIR で受理して `--profile quick` を進める
- Phase 260: block-parameterized CFG へ向けた edge-args terminator 併存導入(大工事 / Strangler
- Phase 260: block-parameterized CFG へ向けた "edge-args terminator 併存導入"(大工事 / Strangler
- Phase 259.x: Me receiver SSOT`variable_map["me"]`)を API 化して `"this"`/`"me"` 混同を構造で潰す
- Phase 141 P2+: Call/MethodCall 対応effects + typing を分離して段階投入、ANF を前提に順序固定)
- Phase 143-loopvocab P3+: 条件スコープ拡張impure conditions 対応)
@ -46,6 +60,17 @@
- **Next Action**: **Phase 260 完了**P0.3まで完了)→ **今後は機能側のPhaseへ**Pattern2 LoopBodyLocal promotion 機能実装)
- **分類**: JoinIR Pattern2 機能拡張compiler機能側、CFG基盤整備は完了
### 次の次(構造で迷子を潰す)
Phase 263Pattern2 LoopBodyLocal “seg”が片付いたら、Pattern2 の「Reject/continue/fallback の揺れ」を構造で潰す。
- ねらい: “Reject でも続行して後段で落ちる” を型/APIで不可能にする
- 方針(最小):
- `PromoteStepBox::try_promote(...) -> Result<PromoteDecision, String>`
- `PromoteDecision::{Promoted, NotApplicable, Freeze}`
- orchestrator が `NotApplicable` を受け取ったら **Pattern2 全体を `Ok(None)` で抜けて fallback**SSOT
- “部分続行” を禁止Fail-Fast/SSOTを維持
## 2025-12-21Phase 260 P2BasicBlock.jump_args 完全削除)✅
- **EdgeCFG SSOT確立完了**: `BasicBlock.jump_args` フィールド削除、edge-args SSOTをterminator operand側に一本化