完全移行→削除の安全順序(Option C)に従い、ScopeContextの
deprecated フィールドと sync helpers を完全削除。
## Changes
- Migrated all access sites to scope_ctx.*
- Removed 7 deprecated fields:
- current_function
- lexical_scope_stack
- function_param_names
- loop_header_stack
- loop_exit_stack
- if_merge_stack
- debug_scope_stack
- Removed 2 sync helpers (sync_scope_ctx_to_legacy, sync_legacy_to_scope_ctx)
- Updated 20+ files with direct field access
## Tests
- cargo build --release: PASS ✅
- Deprecation warnings: 255 → 166 (-89, -35%)
Phase 2 Progress: 4/7 contexts complete (57%)
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::Callwith a concreteCalleewhenever 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).