diff --git a/docs/development/current/main/10-Now.md b/docs/development/current/main/10-Now.md index 1f59c887..5e3d91a6 100644 --- a/docs/development/current/main/10-Now.md +++ b/docs/development/current/main/10-Now.md @@ -1,6 +1,6 @@ # Self Current Task — Now (main) -## Current Focus: Phase 29y P0 Complete ✅ / Phase 287 Complete ✅ / Next: Backlog review +## Current Focus: Phase 29z P0(RC insertion minimal) **2025-12-27: Phase 29y P0 完了** ✅ - docs-first SSOT finalized(ABI/RC insertion/Observability) diff --git a/docs/development/current/main/30-Backlog.md b/docs/development/current/main/30-Backlog.md index 64f975b3..16f379d7 100644 --- a/docs/development/current/main/30-Backlog.md +++ b/docs/development/current/main/30-Backlog.md @@ -57,6 +57,10 @@ Related: - 入口: `docs/development/current/main/phases/phase-29y/README.md` - 次: Phase 29z(RC insertion minimal)または Phase 29x(De-Rust runtime)候補 +- **Phase 29z(next, implementation-minimal): RC insertion minimal** + - 入口: `docs/development/current/main/phases/phase-29z/README.md` + - 指示書: `docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md` + - **Phase 29x(planned, post self-host): De-Rust runtime for LLVM execution** - 目的: LLVM 実行経路のランタイム依存を段階的に Rust から切り離す(脱Rust)。 - 前提: self-host ラインが安定し、VM/LLVM conformance(Phase 285)が十分に固まっていること。 diff --git a/docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md b/docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md new file mode 100644 index 00000000..53677e9d --- /dev/null +++ b/docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md @@ -0,0 +1,61 @@ +# Phase 29z P0: RC insertion minimal(意味論不変ガード付き) + +**Date**: 2025-12-27 +**Status**: Ready(next) +**Scope**: `src/mir/passes/rc_insertion.rs` を no-op から “最小の1ケース” だけ動作する pass にする。 +**Non-goals**: 大規模な所有モデル導入、全ケース対応、既定挙動変更、env var 新設 + +--- + +## 目的(SSOT) + +- Phase 29y の RC insertion SSOT を “実装で1回証明” する。 +- 既定挙動は変えず、**最小ケースだけ**を opt-in で通す(Fail-Fast/rollback容易)。 + +SSOT: +- `docs/development/current/main/phases/phase-29y/20-RC-INSERTION-SSOT.md` + +--- + +## 実装方針(ガード) + +既定OFFで導入する(互換維持)。 + +推奨ガード(env var を増やさない): +- 既存の “profile/strict” の枠に載せるか、`cfg(debug_assertions)` 限定で有効化 +- どうしてもトグルが必要なら `src/config/env` 集約& docs に登録(撤去計画つき) + +--- + +## 最小でやるケース(1つだけ) + +### Case: 上書き release(explicit overwrite) + +`x = ` の直前に、`x` が保持していた “旧値” を release する。 + +制約: +- PHI/loop/early-exit は扱わない(out-of-scope は今は no-op のまま) +- 影響は “明示的な上書き” のみ + +--- + +## 手順 + +1. `src/mir/passes/rc_insertion.rs` の入口を整理し、`RcInsertionStats` を維持したまま実装領域を作る +2. “上書き release” だけを挿入(他は触らない) +3. 最小の conformance fixture を 1 本追加(VMのみでも可、LLVMはSKIP可) +4. 既定OFFで quick が緑のままを確認 + +--- + +## 検証(受け入れ基準) + +```bash +cargo build --release +./tools/smokes/v2/run.sh --profile quick +``` + +受け入れ: +- Build: 0 errors +- quick: 154/154 PASS +- 既定挙動不変(トグルOFFで完全に影響なし) diff --git a/docs/development/current/main/phases/phase-29z/README.md b/docs/development/current/main/phases/phase-29z/README.md new file mode 100644 index 00000000..d49da084 --- /dev/null +++ b/docs/development/current/main/phases/phase-29z/README.md @@ -0,0 +1,9 @@ +# Phase 29z: RC insertion minimal(Phase 29y follow-up) + +Status: Draft +Scope: Phase 29y の SSOT(RC insertion / ABI / observability)を前提に、**RC insertion pass を最小動作**まで進める。 + +Entry: +- SSOT: `docs/development/current/main/phases/phase-29y/20-RC-INSERTION-SSOT.md` +- 指示書: `docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md` +