feat: Iterator helpers 基建——Symbol.dispose 注册与 %IteratorHelperPrototype%

This commit is contained in:
2026-08-16 14:44:47 +08:00
parent c5c4916a8f
commit 9f13d107ec
10 changed files with 567 additions and 6 deletions
+6
View File
@@ -1044,6 +1044,10 @@ pub fn well_known_symbol_id<H: VmHost + ?Sized>(host: &H, ptr: *mut JsObject) ->
Some(9)
} else if std::ptr::eq(ptr, world.sym_species.as_ptr()) {
Some(10)
} else if std::ptr::eq(ptr, world.sym_async_dispose.as_ptr()) {
Some(11)
} else if std::ptr::eq(ptr, world.sym_dispose.as_ptr()) {
Some(12)
} else {
None
}
@@ -1063,6 +1067,8 @@ pub fn well_known_symbol_name(id: u32) -> Option<&'static str> {
8 => "Symbol.asyncIterator",
9 => "Symbol.toStringTag",
10 => "Symbol.species",
11 => "Symbol.asyncDispose",
12 => "Symbol.dispose",
_ => return None,
})
}