feat: rest 参数(function f(...args)),实参区收集数组

This commit is contained in:
2026-08-10 00:33:25 +08:00
parent 5a9a46483d
commit 85c192a747
10 changed files with 184 additions and 8 deletions
+5
View File
@@ -1330,6 +1330,11 @@ impl Vm {
self.dispatch_create_arguments(rd)?;
}
OpCode::CREATE_REST_ARRAY => {
let fixed_count = opcode::b(instr) as usize;
self.dispatch_create_rest_array(rd, fixed_count)?;
}
OpCode::NEW_ARRAY => {
self.dispatch_new_array(rd, instr);
}