refactor: 哈希表存储属性以支持无上限属性个数

This commit is contained in:
爱特每羊队
2026-06-07 15:25:47 +08:00
parent 52fbd3c3d4
commit f6e635cdbe
19 changed files with 779 additions and 599 deletions
+1 -1
View File
@@ -284,7 +284,7 @@ pub fn to_object(val: JsValue, vm: &mut Vm) -> Result<JsValue, &'static str> {
.alloc(JsObject::new_empty(EMPTY_SHAPE_ID, proto_val));
let obj_val = JsValue::from_js_object(obj);
let obj_ref = unsafe { &mut *obj };
obj_ref.set_inline_prop(0, val);
obj_ref.ensure_hash_props().push(Box::new(val));
obj_ref.set_prop_count(1);
Ok(obj_val)
}