feat: MIR builder TypeOp lowering for is/as methods and isType/asType functions
- Add early TypeOp lowering in build_expression for method-style is()/as() - Add early TypeOp lowering in build_expression for function-style isType()/asType() - Add special handling in build_print_statement for print(isType/asType(...)) - Fix MIR optimizer borrow checker issues and remove obsolete BoxFieldLoad - Extract string literal helper supports both direct literals and StringBox wrappers - Note: isType call generation still has issues (undefined SSA value in print) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
75
vm_stats_weak_default.json
Normal file
75
vm_stats_weak_default.json
Normal file
@ -0,0 +1,75 @@
|
||||
🔌 v2 plugin system initialized from nyash.toml
|
||||
✅ v2 plugin system fully configured
|
||||
🚀 Nyash VM Backend - Executing file: local_tests/weak_field_poc.nyash 🚀
|
||||
0
|
||||
{
|
||||
"counts": {
|
||||
"BarrierRead": 1,
|
||||
"BarrierWrite": 1,
|
||||
"BoxCall": 2,
|
||||
"Const": 9,
|
||||
"NewBox": 2,
|
||||
"Print": 1,
|
||||
"RefGet": 4,
|
||||
"RefSet": 3,
|
||||
"Return": 3,
|
||||
"Safepoint": 1,
|
||||
"WeakLoad": 1,
|
||||
"WeakNew": 1
|
||||
},
|
||||
"elapsed_ms": 0.194731,
|
||||
"timestamp_ms": 1755956955634,
|
||||
"top20": [
|
||||
{
|
||||
"count": 9,
|
||||
"op": "Const"
|
||||
},
|
||||
{
|
||||
"count": 4,
|
||||
"op": "RefGet"
|
||||
},
|
||||
{
|
||||
"count": 3,
|
||||
"op": "RefSet"
|
||||
},
|
||||
{
|
||||
"count": 3,
|
||||
"op": "Return"
|
||||
},
|
||||
{
|
||||
"count": 2,
|
||||
"op": "BoxCall"
|
||||
},
|
||||
{
|
||||
"count": 2,
|
||||
"op": "NewBox"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"op": "BarrierRead"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"op": "BarrierWrite"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"op": "Print"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"op": "Safepoint"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"op": "WeakLoad"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"op": "WeakNew"
|
||||
}
|
||||
],
|
||||
"total": 29
|
||||
}
|
||||
✅ VM execution completed successfully!
|
||||
Result: IntegerBox { value: 0, base: BoxBase { id: 4, parent_type_id: None } }
|
||||
Reference in New Issue
Block a user