feat: 搭建原生函数基础设施

This commit is contained in:
爱特每羊队
2026-06-07 01:07:45 +08:00
parent 67b5837379
commit 5d354ddb06
17 changed files with 271 additions and 15 deletions
+2 -1
View File
@@ -199,13 +199,14 @@ impl Compiler {
}
Expression::CallExpression(call) => {
self.count_expression(&call.callee, ctx);
ctx.alloc_reg();
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
ctx.projected_pc += 2; // CALL + extension word (arg_count)
}
Expression::AssignmentExpression(assign) => {
if let oxide_parser::AssignmentTarget::StaticMemberExpression(member) = &assign.left