feat: 新增 Symbol.species well-known symbol 绑定(Symbol.species 解析/键槽/内建对象)

This commit is contained in:
2026-08-12 12:50:53 +08:00
parent e94bbc6c52
commit 62991cfa4b
6 changed files with 22 additions and 3 deletions
+3
View File
@@ -949,6 +949,8 @@ pub fn well_known_symbol_id<H: VmHost + ?Sized>(host: &H, ptr: *mut JsObject) ->
Some(8)
} else if std::ptr::eq(ptr, world.sym_to_string_tag.as_ptr()) {
Some(9)
} else if std::ptr::eq(ptr, world.sym_species.as_ptr()) {
Some(10)
} else {
None
}
@@ -967,6 +969,7 @@ pub fn well_known_symbol_name(id: u32) -> Option<&'static str> {
7 => "Symbol.matchAll",
8 => "Symbol.asyncIterator",
9 => "Symbol.toStringTag",
10 => "Symbol.species",
_ => return None,
})
}