- Created joinir_function_converter.rs (~133 lines): Function-level conversion - Created joinir_block_converter.rs (~691 lines): Block-level conversion - Reduced convert.rs from 943 → 120 lines (87% reduction) - Total: 944 lines (original 943 lines, minimal overhead) - Separation of concerns: Function vs Block responsibilities - All handlers moved to block_converter for better organization - Maintained backward compatibility with existing API - Build successful, simple tests passing
JoinIR → VM bridge layer
Responsibilities:
- Convert normalized JoinIR modules into MIR for the Rust VM without changing semantics.
- Provide a thin runner helper that executes a JoinIR entry via the VM.
- Host experimental metadata-aware paths (Phase 40-1) behind clearly marked helpers.
Boundaries:
- No new control-flow semantics or heuristics here; this layer only maps structures already normalized by JoinIR.
- Keep type information minimal (MirType::Unknown) and avoid adding inference or guessing.
- Debug/diagnostic output must stay behind
NYASH_JOINIR_VM_BRIDGE_DEBUG=1.
File layout:
mod.rs: public surface + shared helpers (naming, error, logging)convert.rs: JoinIR→MIR lowering (functions/blocks/instructions)runner.rs: VM execution entry (run_joinir_via_vm)meta.rs: experimental metadata-aware conversion hookstests.rs: bridge-specific unit tests (kept local to avoid cross-layer leakage)