fix(phase161): Use ArrayBox.get() instead of at() for VM compatibility
- Replace .at() with .get() in mir_analyzer.hako (10 occurrences) - Fix test_rep1_inline.hako and test_mir_analyzer.hako - Builtin ArrayBox only supports .get(), not .at() Phase 161-2 MIR JSON parsing tests now pass: - JSON object parsing: PASS - functions array extraction: PASS - Function name extraction: PASS - blocks extraction: PASS - PHI instruction detection: PASS (found PHI at block=10 dst=r30) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -12,11 +12,10 @@ box TestRunner {
|
||||
print("Test: " + name)
|
||||
print("==================================================")
|
||||
|
||||
// Parse MIR JSON
|
||||
me.analyzer = new MirAnalyzerBox()
|
||||
local result = me.analyzer.birth(mir_json_text)
|
||||
// Parse MIR JSON - use constructor directly
|
||||
me.analyzer = new MirAnalyzerBox(mir_json_text)
|
||||
|
||||
if result == null {
|
||||
if me.analyzer == null {
|
||||
print("FAIL: Failed to parse MIR JSON")
|
||||
return null
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ static box Main {
|
||||
print(" [OK] Correct PHI count (1)")
|
||||
pass_count = pass_count + 1
|
||||
|
||||
local phi = phi_list.at(0)
|
||||
local phi = phi_list.get(0)
|
||||
local block_id = phi.get("block_id")
|
||||
local dest = phi.get("dest")
|
||||
local incoming_count = phi.get("incoming_count")
|
||||
|
||||
Reference in New Issue
Block a user