Implement Phase 6 Box reference operations in MIR/VM - RefNew/RefGet/RefSet/WeakNew/WeakLoad/Barrier*

Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-08-13 09:45:22 +00:00
parent 65ce7a5f8c
commit 84d2aac8da
9 changed files with 416 additions and 4 deletions

23
test_field_access.nyash Normal file
View File

@ -0,0 +1,23 @@
// Test for Phase 6 Box reference operations
// Simple field access test
static box Main {
init { console }
main() {
me.console = new ConsoleBox()
me.console.log("Testing Phase 6 Box reference operations")
// Create a simple object
local obj
obj = new StringBox("Hello")
// Test field access
local result
result = obj.length
print("Field access result: " + result)
return "Phase 6 test completed"
}
}