ast_lowerer.rs → ast_lowerer/ (10 files): - mod.rs: public surface + entry dispatch - context.rs: ExtractCtx helpers - expr.rs: expression-to-JoinIR extraction - if_return.rs: simple if→Select lowering - loop_patterns.rs: loop variants (simple/break/continue) - read_quoted.rs: read_quoted_from lowering (Phase 45-46) - nested_if.rs: NestedIfMerge lowering - analysis.rs: loop if-var analysis + metadata helpers - tests.rs: frontend lowering tests - README.md: module documentation join_ir_vm_bridge.rs → join_ir_vm_bridge/ (5 files): - mod.rs: public surface + shared helpers - convert.rs: JoinIR→MIR lowering - runner.rs: VM execution entry (run_joinir_via_vm) - meta.rs: experimental metadata-aware hooks - tests.rs: bridge-specific unit tests - README.md: module documentation Benefits: - Clear separation of concerns per pattern - Easier navigation and maintenance - Each file has single responsibility - README documents module boundaries Co-authored-by: ChatGPT <noreply@openai.com> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
897 B
Rust
26 lines
897 B
Rust
//! Phase 40-1実験用メタデータ
|
||
//!
|
||
//! JoinIR本体(JoinFunction/JoinModule)には埋め込まず、
|
||
//! 実験パスでのみ横から渡す設計。
|
||
//!
|
||
//! # Phase 40拡張計画
|
||
//! - Phase 40-1: if_modified_vars(このPhase)
|
||
//! - Phase 40-2: conservative_vars(後で追加)
|
||
//! - Phase 40-3: reset_vars(後で追加)
|
||
|
||
use super::super::JoinFuncId;
|
||
use std::collections::{BTreeMap, HashSet};
|
||
|
||
/// Phase 40-1実験用メタデータ
|
||
#[derive(Debug, Default, Clone)]
|
||
pub struct JoinFuncMeta {
|
||
/// Phase 40-1: if-in-loop modified variables
|
||
/// loop body内のif文で代入される変数名
|
||
pub if_modified_vars: Option<HashSet<String>>,
|
||
// Phase 40-2: conservative_vars(後で追加)
|
||
// Phase 40-3: reset_vars(後で追加)
|
||
}
|
||
|
||
/// JoinFuncId → JoinFuncMeta のマッピング
|
||
pub type JoinFuncMetaMap = BTreeMap<JoinFuncId, JoinFuncMeta>;
|