feat: String 盒迁移 boxed_value 载荷并物化固有属性面

This commit is contained in:
2026-09-22 16:40:01 +00:00
parent 1be90d90aa
commit 2252ed7bbc
13 changed files with 432 additions and 149 deletions
+3 -3
View File
@@ -1547,10 +1547,10 @@ fn get_iterator<H: VmHost>(vm: &mut H, value: JsValue) -> Result<Option<(JsValue
return Err(exc);
}
};
// 码元快速路径的 inner:原始串取 value 本身;装箱串取其内容(槽 0 恒为
// 原始串)——wrapper 码元步进按原始串产出,装箱串不直接作 inner。
// 码元快速路径的 inner:原始串取 value 本身;装箱串取其 boxed_value
// 载荷——wrapper 码元步进按原始串产出,装箱串不直接作 inner。
let inner = if value_is_string_box {
let raw = unsafe { (&*value.as_js_object_ptr()).get_prop_at(0) };
let raw = unsafe { (&*value.as_js_object_ptr()).boxed_value() };
if raw.is_string() {
raw
} else {