Files
hakorune/local_tests/test_mir_wasm_simple.nyash
Moe Charm cde961defc feat(phase-9.77): Implement BoxCall instructions and fix wasmtime version
Phase 9.77 WASM Emergency Recovery Progress:
-  Task 1.1: Implement BoxCall instruction for toString(), print(), equals(), clone(), log()
-  Task 1.2: Update wasmtime 18.0 → 35.0.0 and add runtime imports
- 🔄 Task 1.3: Working on UTF-8 encoding error fix

Changes:
- Add generate_box_call() method in codegen.rs with 5 helper methods
- Update wasmtime dependency to 35.0.0 for AOT compatibility
- Add BoxCall runtime imports (box_to_string, box_print, box_equals, box_clone)
- Implement wat_to_wasm() with UTF-8 validation and debug output
- Update CURRENT_TASK.md with Copilot handoff notes

Current issue: 'Generated WASM is not valid UTF-8' error source unknown
Next: Copilot to investigate error origin and complete Task 1.3

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 21:21:51 +09:00

28 lines
770 B
Plaintext

// 🧪 MIR → WASM変換テスト用シンプルプログラム
// 基本的な演算とBox操作をテスト
static box Main {
init { console, result }
main() {
me.console = new ConsoleBox()
me.console.log("🚀 MIR → WASM変換テスト開始")
// 基本演算テスト
local a = 10
local b = 20
local sum = a + b
me.console.log("計算結果: " + sum.toString())
// StringBox操作テスト
local greeting = "Hello"
local name = "WASM"
local message = greeting + " " + name + "!"
me.console.log("メッセージ: " + message)
me.result = sum
return "MIR → WASM変換テスト完了"
}
}