Files
hakorune/local_tests/test_windows_vm.nyash
Moe Charm 54f7d6eb63 WIP: Add Store instruction to MIR for variable assignments
- Added Store instruction generation in build_assignment()
- This partially addresses the VM infinite loop issue
- However, the loop still uses old values (%0) instead of updated values
- Need to implement proper SSA phi nodes for loop variables

The root cause: MIR generation doesn't properly track variable updates
in loops. Current SSA implementation lacks phi nodes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 22:04:50 +09:00

25 lines
538 B
Plaintext

// Windows VM Test Program
// 超シンプルなプログラムでVMの動作確認
print("🎉 Hello from Nyash VM on Windows!")
print("=====================================")
// 基本的な計算
local x = 10
local y = 20
local result = x + y
print("10 + 20 = " + result)
// ループテスト
print("\nCounting to 5:")
local i = 1
loop(i <= 5) {
print(" Count: " + i)
i = i + 1
}
// Box生成テスト
local str = new StringBox("Nyash")
print("\nStringBox created: " + str)
print("\n✅ VM test completed successfully!")