mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
fix: 补齐代理分支 IC 扩展字消费与 spread 调用代理路由
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user