fix: 顶层声明撞不可定义全局按规范抛 TypeError

This commit is contained in:
2026-09-14 14:32:39 +00:00
parent 91946f3fe3
commit d161b7cfe3
11 changed files with 332 additions and 57 deletions
+8
View File
@@ -2195,6 +2195,14 @@ impl Vm {
self.dispatch_delete_global_prop_c(rd, a, key_idx)?;
}
OpCode::CAN_DECLARE_GLOBAL_FUNC => {
self.dispatch_can_declare_global_func(rd, b)?;
}
OpCode::DEFINE_GLOBAL_FUNC_BIND => {
self.dispatch_define_global_func_bind(rd, a, b)?;
}
OpCode::DEFINE_PROP_ATTRS => {
let attrs = self.bytecode[self.pc] as u8;
self.pc += 1;