fix: 修复忽略调用语句参数寄存器计数问题

This commit is contained in:
爱特每羊队
2026-06-06 15:54:43 +08:00
parent 741bbcfecd
commit 04f465d0de
+5
View File
@@ -121,6 +121,11 @@ impl Compiler {
}
Expression::CallExpression(call) => {
self.count_expression(&call.callee, ctx);
for arg in &call.arguments {
if let Some(expr) = arg.as_expression() {
self.count_expression(expr, ctx);
}
}
ctx.alloc_reg();
ctx.projected_pc += 1; // CALL
}