Files
hakorune/src/mir/builder/calls
nyash-codex 4565f7476d wip(mir): StaticCompiler receiver正規化の部分的修正 - 将来の根治に向けた基盤整備
【修正内容】
1. src/mir/builder/calls/guard.rs
   - receiver型情報がない場合のpass-through処理追加
   - ME-CALL として後段処理に委譲

2. src/mir/builder/ssa/local.rs
   - receiver kind で型情報がない場合、origin から型を推論
   - value_types への伝播を強化

【現状】
- 完全な根治には至っていない(MIR builder設計レベルの複雑な依存関係)
- .hako側workaround (51d53c29) が実用的な解決策として機能中

【根本原因】
- value_origin_newbox に ParserBox が保持される
- value_types に実際の型(String等)が欠落
- receiver に型情報がないまま StaticCompiler Method に解決される問題

【今後の方向性】
- MIR builder の型伝播システム全体の見直しが必要
- Phase 25.1: Stage-1 bridge receiver bug (partial fix)
2025-11-21 13:28:35 +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).