mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
feat: 间接 eval 读全局词法环境镜像并补齐写路径
This commit is contained in:
@@ -281,6 +281,12 @@ impl Vm {
|
||||
Err(e) => return Err(e),
|
||||
},
|
||||
|
||||
OpCode::LOAD_GLOBAL_LEX => match self.dispatch_load_global_lex(rd, instr) {
|
||||
Ok(true) => continue,
|
||||
Ok(false) => {}
|
||||
Err(e) => return Err(e),
|
||||
},
|
||||
|
||||
OpCode::LOAD_GLOBAL_TYPEOF => {
|
||||
self.dispatch_load_global_typeof(rd, instr)?;
|
||||
}
|
||||
@@ -581,6 +587,12 @@ impl Vm {
|
||||
self.dispatch_delete_global_prop_c(rd, a, key_idx)?;
|
||||
}
|
||||
|
||||
OpCode::STORE_GLOBAL_LEX => {
|
||||
let key_idx = self.bytecode[self.pc] as u16;
|
||||
self.pc += 1;
|
||||
self.dispatch_store_global_lex(a, key_idx)?;
|
||||
}
|
||||
|
||||
OpCode::CAN_DECLARE_GLOBAL_FUNC => {
|
||||
self.dispatch_can_declare_global_func(rd, b)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user