feat: 函数代理 apply 与 construct trap 路由落地

This commit is contained in:
2026-10-17 07:53:31 +00:00
parent addaab394d
commit e5db10581e
12 changed files with 437 additions and 152 deletions
+5
View File
@@ -125,6 +125,11 @@ impl Vm {
if !callee_obj.is_function() {
return Err(self.error_message_text("TypeError", "accessor is not callable"));
}
// Proxy [[Call]]:apply trap 权威(target, thisArgument, argumentsList);
// trap 缺失落穿 target 的普通调用路径(嵌套代理经递归自然消解)。
if callee_obj.is_proxy_obj() {
return crate::proxy::proxy_apply_call(self, callee_obj, receiver, args);
}
if let Some(native_fn) = callee_obj.native_fn() {
if self.native_call_depth >= self.kernel_core.config.max_call_depth {