Files
hakorune/src/mir/join_ir/frontend/func_meta.rs
nyash-codex 447bbec998 refactor(joinir): Split ast_lowerer and join_ir_vm_bridge into modules
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>
2025-11-28 17:42:19 +09:00

26 lines
897 B
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.

//! 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>;