feat: MIR Call命令統一Phase 3.1-3.2完了!統一Call実装進行中
✨ Phase 3.1-3.2実装完了 - build_indirect_call_expressionでCallTarget::Value使用 - print関数をcall_global print()として統一 - build_function_callでemit_unified_call使用 - ExternCall(env.console.log)→Callee::Global(print)完全移行 🏗️ MIR統一基盤構築 - src/mir/definitions/call_unified.rs: 統一定義(297行) - emit_unified_call()と便利メソッド3種実装 - NYASH_MIR_UNIFIED_CALL=1で段階移行制御 - VM実行器でCallee対応実装済み 📊 進捗状況(26%削減見込み) - Phase 1-2: ✅ 基盤構築完了 - Phase 3.1-3.2: ✅ 基本関数統一完了 - Phase 3.3: 🔄 BoxCall統一中 - Phase 4: 📅 Python LLVM(最優先・63%削減) - Phase 5: 📅 PyVM/VM統一 📚 ドキュメント更新 - CLAUDE.md: テストスクリプト参考集追加 - CURRENT_TASK.md: Phase 3進捗更新 - python-llvm-priority-rationale.md: 優先順位戦略文書化 - mir-call-unification-master-plan.md: スケジュール最新化 🎯 6種類→1種類: Call/BoxCall/PluginInvoke/ExternCall/NewBox/NewClosure → MirCall統一へ 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -45,7 +45,7 @@ static box Main {
|
||||
|
||||
// Parser delegation
|
||||
parse_program(src, stage3_flag) {
|
||||
local parser = new ParserBoxMod.ParserBox()
|
||||
local parser = new ParserBox()
|
||||
if stage3_flag == 1 { parser.stage3_enable(1) }
|
||||
// Collect using metadata (no-op acceptance in Stage‑15)
|
||||
parser.extract_usings(src)
|
||||
@ -55,7 +55,7 @@ static box Main {
|
||||
|
||||
main(args) {
|
||||
// Debug setup
|
||||
me.dbg = new DebugBoxMod.DebugBox()
|
||||
me.dbg = new DebugBox()
|
||||
me.dbg.set_enabled(0)
|
||||
|
||||
// Source selection (EXE-first friendly)
|
||||
@ -136,14 +136,14 @@ static box Main {
|
||||
|
||||
if emit_mir == 1 {
|
||||
// Lower minimal AST to MIR JSON (Return(Int) only for MVP)
|
||||
local mir = new MirEmitterBoxMod.MirEmitterBox()
|
||||
local mir = new MirEmitterBox()
|
||||
local aj = ast_json
|
||||
if do_scopebox == 1 { aj = new ScopeBoxInject().apply(aj) }
|
||||
if do_loopform == 1 { aj = new LoopFormNormalize().apply(aj) }
|
||||
json = mir.emit_mir_min(aj)
|
||||
} else {
|
||||
// Emit Stage‑1 JSON with metadata
|
||||
local emitter = new EmitterBoxMod.EmitterBox()
|
||||
local emitter = new EmitterBox()
|
||||
local aj2 = ast_json
|
||||
if do_scopebox == 1 { aj2 = new ScopeBoxInject().apply(aj2) }
|
||||
if do_loopform == 1 { aj2 = new LoopFormNormalize().apply(aj2) }
|
||||
|
||||
Reference in New Issue
Block a user