fix: 补齐代理分支 IC 扩展字消费与 spread 调用代理路由

This commit is contained in:
2026-10-18 03:26:36 +00:00
parent 2c8ad6c772
commit 77a11f5f5d
4 changed files with 37 additions and 22 deletions
+14
View File
@@ -974,6 +974,20 @@ impl Vm {
.raise_type_error("class constructor cannot be invoked without 'new'")
.map(|_| true);
}
// Proxy [[Call]]:apply trap 权威(target, thisArgument,
// argumentsList);trap 缺失落穿 target 的普通调用路径。
if obj.is_proxy_obj() {
match crate::proxy::proxy_apply_call(self, obj, this_value, &args) {
Ok(v) => {
self.regs[0] = v;
return Ok(false);
}
Err(msg) => {
self.raise_call_error(&msg)?;
return Ok(true);
}
}
}
// 无本体函数对象(Function.prototype):[[Call]] 接受任意实参
// 返回 undefined,不执行函数体。
if obj.native_fn().is_none() && obj.sub_module_index() == 0 {
+1
View File
@@ -374,6 +374,7 @@ impl Vm {
if self.accessor_frame_target_reg.take().is_none() {
self.regs[a] = val;
}
self.pc += IC_EXT_WORDS;
return Ok(());
}
// 入口快判:键寄存器恒为 perm 串,指针相等即键为 "length";