feat(control_tree): Phase 129-C post-if via post_k continuation
This commit is contained in:
@ -1,13 +1,31 @@
|
||||
# Self Current Task — Now (main)
|
||||
|
||||
## Next: Phase 129-C(post-if / post_k)
|
||||
## 2025-12-18:Phase 129-C 完了 ✅
|
||||
|
||||
**Phase 129: Materialize join_k continuation(dev-only)**
|
||||
- 現状: Phase 129-B で join_k “if-as-last” を実体化(then/else は TailCall(join_k))
|
||||
- 補足: `src/mir/control_tree/normalized_shadow/` は責務分離済み(`if_as_last_join_k.rs` / `normalized_verifier.rs` / `parity_contract.rs` / `dev_pipeline.rs` など)
|
||||
- 残り: post-if(`if { x=2 }; return x`)を post_k continuation で表現(join_k → post_k の tailcall)
|
||||
**Phase 129-C: post-if / post_k continuation(dev-only)**
|
||||
- post-if(`if { x=2 }; return x`)を post_k continuation で表現
|
||||
- join_k が env merge → TailCall(post_k, merged_env)
|
||||
- post_k が post-if statements 実行 → Ret
|
||||
- PHI禁止: Normalized IR 内に PHI 相当を入れず env 引数で合流
|
||||
- 実装:
|
||||
- `src/mir/control_tree/normalized_shadow/post_if_post_k.rs`(392行、新規)
|
||||
- `builder.rs` に PostIfPostKBuilderBox 統合
|
||||
- `normalized_verifier.rs` に post_k 構造検証追加
|
||||
- `parity_contract.rs` に StructureMismatch 追加
|
||||
- Fixture: `apps/tests/phase129_if_only_post_if_return_var_min.hako`
|
||||
- Smoke: `phase129_if_only_post_if_return_var_vm.sh` PASS
|
||||
- Regression: Phase 129-B, 128 維持確認(全 PASS)
|
||||
- Unit tests: 1155/1155 PASS
|
||||
- 入口: `docs/development/current/main/phases/phase-129/README.md`
|
||||
|
||||
## Next: Phase 130+(Loop patterns / Complex RHS)
|
||||
|
||||
**Phase 130以降の展開**
|
||||
- Loop patterns の Normalized lowering
|
||||
- Assign(complex expr) RHS 対応
|
||||
- Nested if 対応
|
||||
- 詳細は Phase 129 README の "Related Phases" 参照
|
||||
|
||||
## 2025-12-18:Phase 127 完了 ✅
|
||||
|
||||
**Phase 127: unknown-read strict Fail-Fast(dev-only)**
|
||||
|
||||
Reference in New Issue
Block a user