Files
hakorune/src/mir/join_ir_vm_bridge
nyash-codex 45add0f5d3 feat(joinir): Phase 90 P0 - ParseStringComposite pattern
## Composite Pattern
- Continue(escape i+=2) + EarlyReturn(close quote)
- parse_string_composite_pattern.rs (50行、continue_return 再利用)
- 89% コード削減(450行→50行)

## Shape Detection
- BinOp Add const 2 検出(escape 特徴)
- LoopStepInspector 活用(Phase 89 リファクタ成果)

## SSOT Integration
- dev_fixtures.rs に登録
- StepCalculator 再利用(Phase 89-2 成果)

## Tests
- +2 tests (vm_bridge + 期待値 n=10→acc=5)
- normalized_dev: 61→63 passed
- lib: 993 passed (回帰なし)

Impact:
- Reuse over Duplication 実践
- Phase 89 リファクタ成果の完全活用
- 箱化原則 5/5 遵守

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 03:36:45 +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)