fix: 修复多分配寄存器导致的空属性问题

This commit is contained in:
爱特每羊队
2026-06-06 12:48:18 +08:00
parent 2b7b8d2ac7
commit 66b52ff11d
2 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -205,9 +205,8 @@ impl Compiler {
}
Expression::StaticMemberExpression(member) => {
self.count_expression(&member.object, ctx);
ctx.alloc_reg(); // key register
ctx.alloc_reg();
ctx.projected_pc += 1; // LOAD_CONST key
ctx.alloc_reg(); // result register
ctx.projected_pc += 1; // IC_GET_PROP
ctx.projected_pc += 1; // IC ext word
}