feat: 实现 Symbol.for 和 Symbol.keyFor

This commit is contained in:
爱特每羊队
2026-06-14 17:48:31 +08:00
parent 1d19147820
commit ba5ff279d9
5 changed files with 100 additions and 0 deletions
@@ -15,6 +15,16 @@ pub fn bind_symbol(core: &Arc<KernelCore>, session: &KernelSession, global: &mut
configure_native_constructor(ctor, crate::builtins::symbol::symbol_constructor as *const (), 1);
apply_binding_table(
session.builtin_world(),
ctor,
core,
&[
("for", crate::builtins::symbol::symbol_for as *const (), 1),
("keyFor", crate::builtins::symbol::symbol_key_for as *const (), 1),
],
);
apply_binding_table(
session.builtin_world(),
proto,