Files
hakorune/src/mir/join_ir_vm_bridge
nyash-codex 6d069ba61d feat(joinir): Phase 188 Print instruction + Router integration
- Add MirLikeInst::Print variant for direct output operations
- Implement Print instruction in JSON serialization
- Update simple_while_minimal.rs to use Print instead of BoxCall
- Add Print handling in JoinIR VM bridge and runner
- Add router logic to call Pattern 1 lowerer from main pipeline

Note: Router integration exposes ValueId mismatch issue between
Pattern 1's hardcoded IDs and host function's variables.
This architectural issue needs resolution in next phase.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:50:05 +09:00
..

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 hooks
  • tests.rs: bridge-specific unit tests (kept local to avoid cross-layer leakage)