Files
hakorune/src/mir/builder/control_flow/edgecfg/api/mod.rs
tomoaki 1b7fd7a0ff refactor(plan): Phase 273 P3+ - Legacy code removal
Phase 273 P3+ 完成: レガシーコード削除 + 未使用 import 整理

Removed Legacy Items:
1. emit_scan_with_init_edgecfg() - Pattern6 固有の emission 関数
   - File deleted: src/mir/builder/emission/loop_scan_with_init.rs (~144 lines)
   - Replaced by: generalized Frag API (Phase 273 P2)

2. CoreCarrierInfo struct - Legacy carrier representation
   - Removed from: src/mir/builder/control_flow/plan/mod.rs (~15 lines)
   - Replaced by: CorePhiInfo (generalized PHI representation)

3. verify_carrier() function - CoreCarrierInfo validator
   - Removed from: src/mir/builder/control_flow/plan/verifier.rs (~15 lines)
   - Replaced by: generalized PHI verification (V7-V9)

Code Cleanup:
- cargo fix applied: unused imports removed (~30 files)
- Verifier invariants updated: V1→V2-V9 (carrier→PHI model)
- Module declaration cleanup in emission/mod.rs

Impact:
- Total lines removed: ~174 lines (net reduction)
- Pattern-agnostic architecture strengthened
- All legacy Pattern6 references eliminated

Tests:
-  VM tests PASS (phase254/256/258)
-  LLVM tests PASS (phase256/258)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:11:20 +09:00

41 lines
1.3 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! EdgeCFG Fragment APIPhase 264: 入口SSOT
//!
//! # コア概念
//! - [`ExitKind`]: 脱出種別(一次概念)
//! - [`EdgeStub`]: 未配線エッジ
//! - [`Frag`]: CFG断片
//! - [`compose`]: 合成関数群Phase 264: TODO実装、pub(crate)
//!
//! # 設計原則
//! - ExitKind を一次概念にし、pattern番号は「形の認識」までに縮退
//! - 値の合流は EdgeCFG の block params + edge-args で表すPHI/推測/メタに逃げない)
//! - Fail-Fast: verify で不変条件を早期検証
//!
//! # 関連文書
//! - 北極星設計: `docs/development/current/main/design/edgecfg-fragments.md`
//! - EdgeCFG 基盤: `docs/development/current/main/design/join-explicit-cfg-construction.md`
pub mod exit_kind;
pub mod edge_stub;
pub mod frag;
pub mod compose;
pub mod verify;
pub mod emit; // Phase 266: 追加
pub mod branch_stub; // Phase 267 P0: 追加
// 公開型(安定)
pub use exit_kind::ExitKind;
pub use edge_stub::EdgeStub;
pub use frag::Frag;
pub use branch_stub::BranchStub; // Phase 267 P0: 追加
// 合成関数Phase 264: crate内のみ公開、Phase 265+でpub化
pub(crate) use compose::{seq, if_, loop_, cleanup};
// 検証関数
pub use verify::verify_frag_invariants;
// Phase 266: strict 版追加
// Phase 267 P0: wires + branches → MIR terminator 変換
pub use emit::emit_frag;