refactor(joinir): Phase 27.10 - CFG sanity checks + dispatcher pattern 共通化
- common.rs 新規作成(162行): - CFG sanity check helpers: ensure_entry_has_succs, has_const_int, has_const_string, has_string_method, has_binop - Logging helper: log_fallback - Dispatcher: dispatch_lowering - skip_ws.rs: CFG checks (-25行) + dispatcher (-2行) = -27行削減 - funcscanner_trim.rs: CFG checks (-25行) + dispatcher (-4行) = -29行削減 - mod.rs: pub mod common 追加 設計原則: - 軽量パターンマッチング(命令の存在確認のみ) - Graceful degradation(予期しない構造で即座にfallback) - DRY原則(重複コード1箇所に集約) 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -5,10 +5,12 @@
|
||||
//! このモジュールは各種 MIR 関数を JoinIR に変換する lowering 関数を提供します。
|
||||
//!
|
||||
//! ## 構成:
|
||||
//! - `common.rs`: CFG sanity checks と lowering 共通ユーティリティ(Phase 27.10)
|
||||
//! - `min_loop.rs`: JoinIrMin.main/0 専用の最小ループ lowering
|
||||
//! - `skip_ws.rs`: Main.skip/1 の空白スキップ lowering(手書き版+MIR自動解析版)
|
||||
//! - `funcscanner_trim.rs`: FuncScannerBox.trim/1 の trim lowering
|
||||
|
||||
pub mod common;
|
||||
pub mod funcscanner_trim;
|
||||
pub mod min_loop;
|
||||
pub mod skip_ws;
|
||||
|
||||
Reference in New Issue
Block a user