phase29aa(p4): propagate rc state along jump chain to return
This commit is contained in:
@ -2,14 +2,15 @@
|
||||
|
||||
## Current Focus: Phase 29aa P4(Jump-chain propagation to Return)
|
||||
|
||||
**2025-12-27: Phase 29aa P4 完了** ✅
|
||||
- 目的: Jump の直列チェーン(単一 predecessor)を通して ReturnCleanup を成立させる(cleanup は Return block のみ)
|
||||
- 入口: `docs/development/current/main/phases/phase-29aa/README.md`
|
||||
- 次: Phase 29aa P5(候補: multi-predecessor/PHI/loop/early-exit の安全設計)
|
||||
|
||||
**2025-12-27: Phase 29aa P3 完了** ✅
|
||||
- 目的: Jump→Return(単一 predecessor)で state 伝播し ReturnCleanup を成立
|
||||
- 入口: `docs/development/current/main/phases/phase-29aa/README.md`
|
||||
|
||||
**2025-12-27: Phase 29aa P4 進行中**
|
||||
- 目的: Jump の直列チェーン(単一 predecessor)を通して ReturnCleanup を成立させる(cleanup は Return block のみ)
|
||||
- 入口: `docs/development/current/main/phases/phase-29aa/README.md`
|
||||
|
||||
**2025-12-27: Phase 29z P2 closeout** ✅
|
||||
- `src/mir/passes/rc_insertion.rs`: `Store` 上書き + `Store null`(explicit drop)+ Return終端cleanup の最小 release 挿入(単一block・安全ガード)
|
||||
- 既定OFF: Cargo feature `rc-insertion-minimal`(env var 新設なし)
|
||||
|
||||
@ -68,10 +68,11 @@ Related:
|
||||
- 入口: `docs/development/current/main/phases/phase-29z/README.md`
|
||||
- 指示書: `docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md`
|
||||
|
||||
- **Phase 29aa(P3 COMPLETE / P4 planned): RC insertion safety expansion(CFG-aware)**
|
||||
- **Phase 29aa(P4 COMPLETE / P5 planned): RC insertion safety expansion(CFG-aware)**
|
||||
- 進捗: P2 ✅ 完了(Jump/Branch 終端で cleanup を入れない契約の SSOT 化)
|
||||
- 進捗: P3 ✅ 完了(Jump→Return single-predecessor state 伝播)
|
||||
- 次: P4(Jump-chain propagation to Return)
|
||||
- 進捗: P4 ✅ 完了(Jump-chain propagation to Return)
|
||||
- 次: P5(multi-predecessor/PHI/loop/early-exit の安全設計)
|
||||
- 入口: `docs/development/current/main/phases/phase-29aa/README.md`
|
||||
|
||||
- **Phase 29x(planned, post self-host): De-Rust runtime for LLVM execution**
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Phase 29aa: RC insertion safety expansion(CFG-aware design)
|
||||
|
||||
Status: P3 Complete (Jump→Return single-predecessor propagation)
|
||||
Status: P4 Complete (Jump-chain propagation to Return)
|
||||
Scope: Phase 29z の単一block限定実装から、誤releaseを起こさない形で CFG-aware に拡張するための設計を固める。
|
||||
|
||||
Entry:
|
||||
@ -23,6 +23,7 @@ Progress:
|
||||
- P1: rc_insertion を RcPlan の Plan→Apply 2-stage へ分離(挙動不変)
|
||||
- P2: Jump/Branch 終端では cleanup を入れない契約を SSOT 化(Fail-Fast guard)
|
||||
- P3: Jump→Return(単一 predecessor)で state 伝播し ReturnCleanup を成立させる(P2維持)
|
||||
- P4: Jump-chain(単一 predecessor 直列)で state 伝播し ReturnCleanup を成立させる(P2/P3 維持)
|
||||
|
||||
P3 SSOT:
|
||||
- Contract:
|
||||
@ -37,3 +38,17 @@ P3 SSOT:
|
||||
- quick 154/154 PASS 維持
|
||||
- `cargo run --bin rc_insertion_selfcheck --features rc-insertion-minimal` PASS
|
||||
- 既定OFF維持(featureなしは no-op)
|
||||
|
||||
P4 SSOT:
|
||||
- Contract:
|
||||
- cleanup は Return block の BeforeTerminator のみ(Jump/Branch block には入れない)
|
||||
- Jump-chain(単一 predecessor の Jump 直列)のみ state 伝播を許可
|
||||
- cycle(loop)検出時は debug_assert! で Fail-Fast、伝播は停止
|
||||
- Non-goals:
|
||||
- Branch/PHI/loop/early-exit の cleanup
|
||||
- multi-predecessor の合流(PHI 問題回避)
|
||||
- Jump block への release 挿入(P2維持)
|
||||
- Acceptance:
|
||||
- quick 154/154 PASS 維持
|
||||
- `cargo run --bin rc_insertion_selfcheck --features rc-insertion-minimal` PASS
|
||||
- 既定OFF維持(featureなしは no-op)
|
||||
|
||||
Reference in New Issue
Block a user