mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
refactor: 运行时符号键调用点改经 realm 维度编码
This commit is contained in:
@@ -3,8 +3,8 @@ use crate::vm_trace;
|
||||
use oxide_runtime_api::{push_units_to, to_boolean, to_units_full};
|
||||
use oxide_types::object::{JsObject, PropAttributes};
|
||||
use oxide_types::private_key::{
|
||||
int_key_value, is_int_key, is_private_name_key, is_symbol_key, make_int_key, make_well_known_symbol_key,
|
||||
INT_KEY_COUNT, WELL_KNOWN_SYMBOL_HAS_INSTANCE,
|
||||
encode_symbol_key, int_key_value, is_int_key, is_private_name_key, is_symbol_key, make_int_key, INT_KEY_COUNT,
|
||||
WELL_KNOWN_SYMBOL_HAS_INSTANCE,
|
||||
};
|
||||
use oxide_types::value::JsValue;
|
||||
|
||||
@@ -388,7 +388,7 @@ impl Vm {
|
||||
return self.raise_type_error("INSTANCEOF right-hand side is not callable");
|
||||
}
|
||||
|
||||
let has_instance_si = make_well_known_symbol_key(WELL_KNOWN_SYMBOL_HAS_INSTANCE);
|
||||
let has_instance_si = encode_symbol_key(self.realm_id(), WELL_KNOWN_SYMBOL_HAS_INSTANCE);
|
||||
|
||||
let ctor_obj = unsafe { &*rhs_val.as_js_object_ptr() };
|
||||
let has_instance_val = self.ordinary_get(ctor_obj, has_instance_si, rhs_val)?;
|
||||
|
||||
Reference in New Issue
Block a user