Files
hakorune/src/mir/builder/calls
nyash-codex 440f8646b1 feat(joinir): Phase 183 LoopBodyLocal role separation + test fixes
Phase 183 Implementation:
- Added is_var_used_in_condition() helper for AST variable detection
- Implemented LoopBodyLocal filtering in TrimLoopLowerer
- Created 4 test files for P1/P2 patterns
- Added 5 unit tests for variable detection

Test Fixes:
- Fixed test_is_outer_scope_variable_pinned (BasicBlockId import)
- Fixed test_pattern2_accepts_loop_param_only (literal node usage)

Refactoring:
- Unified pattern detection documentation
- Consolidated CarrierInfo initialization
- Documented LoopScopeShape construction paths

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:43:26 +09:00
..

MIR Builder — Calls SSOT

Scope

  • This directory is the single source of truth for call shaping in the builder.
  • Responsibilities: target resolution, extern mapping, method lookup, flags/effects, MIR emission.

Out of scope

  • Runtime dispatch details (VM/LLVM) and legacy by-name resolution. The VM keeps a legacy resolver only behind a dev flag for bring-up.

Contract

  • Builder must populate MirInstruction::Call with a concrete Callee whenever possible.
  • Arity and canonical names are normalized here so runtimes can be simple routers.

Phase-3 alignment

  • VM call resolver is treated as legacy-only. Default runtime disables by-name fallback.
  • Extern interface normalization aligns with handlers/calls/externs.rs (runtime SSOT for extern dispatch).