feat(mir/llvm): Phase 273 P0-P1 DomainPlan→CorePlan + LLVM arg fix

Phase 273 P0-P1: Two-layer plan architecture
- DomainPlan: Pattern-specific knowledge (ScanWithInit)
- CorePlan: Fixed vocabulary (Seq, Loop, If, Effect, Exit)
- ValueId references only (String expressions forbidden)
- Pipeline: Extractor→Normalizer→Verifier→Lowerer

New plan/ module:
- mod.rs: Type definitions, SSOT spec
- normalizer.rs: DomainPlan→CorePlan + ID allocation
- verifier.rs: V1-V6 invariant checks (fail-fast)
- lowerer.rs: CorePlan→MIR (pattern-agnostic)

LLVM fix (ChatGPT):
- function_lower.py: Fix argument reference bug
- Phase 258 index_of_string now PASS on LLVM backend

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-22 22:42:56 +09:00
parent f07c2e7874
commit 960241795d
20 changed files with 1728 additions and 388 deletions

View File

@ -2,12 +2,9 @@
## Current Focus (next)
- Phase 278cleanup: `docs/development/current/main/phases/phase-278/README.md`
- Phase 277 P2 の後方互換旧PHI env varを撤去して、1セットに収束させ
- Phase 279impl: `docs/development/current/main/phases/phase-279/README.md`
- “2本のコンパイラ” にならないように、型伝播パイプラインの入口/順序を SSOT で一本化する
- Phase 273design-first: `docs/development/current/main/30-Backlog.md`
- Pattern を Plan Extractorpureへ降格し、`Plan → Frag → emit_frag()` に収束させる
- Phase 273design-first: `docs/development/current/main/phases/phase-273/README.md`
- P1: DomainPlan→CorePlan固定語彙+ PlanNormalizerSSOT+ PlanVerifierfail-fastで “増殖” を止め
- CorePlan は `Seq/Loop/If/Effect/Exit` のみscan専用 Effect/variant 禁止、式を String にしない)
## Recently Completed (2025-12-22)
@ -15,6 +12,9 @@
- Phase 276 P0quick wins / type_helper SSOT: `docs/development/current/main/phases/phase-276/README.md`
- Phase 277 P1PHI strict fail-fast: `docs/development/current/main/phases/phase-277/README.md`
- Phase 277 P2PHI env var 統合): `docs/development/current/main/phases/phase-277/README.md`
- Phase 278 P0deprecated PHI env vars removal: `docs/development/current/main/phases/phase-278/README.md`
- Phase 279 P0type propagation pipeline SSOT unification: `docs/development/current/main/phases/phase-279/README.md`
- Phase 273 P0Plan Extractor PoC: `docs/development/current/main/phases/phase-273/README.md`
---