refactor: 表驱动化直接 builtin 绑定模块

This commit is contained in:
爱特每羊队
2026-06-09 00:02:08 +08:00
parent bbfde72dfb
commit a0c1181fdc
10 changed files with 141 additions and 486 deletions
+12 -14
View File
@@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::bind_constructor_hash;
use oxide_kernel::bind_method;
use oxide_kernel::bind_methods;
use oxide_kernel::kernel::OxideKernel;
use oxide_types::object::JsObject;
@@ -18,23 +18,21 @@ pub fn bind_boolean(kernel: &Arc<OxideKernel>, global: &mut JsObject) {
));
ctor.set_native_arg_count(1);
bind_method!(
bind_methods!(
kernel.builtin_world(),
proto,
sf,
sh,
"valueOf",
crate::builtins::boolean::boolean_prototype_value_of,
0
);
bind_method!(
kernel.builtin_world(),
proto,
sf,
sh,
"toString",
crate::builtins::boolean::boolean_prototype_to_string,
0
(
"valueOf",
crate::builtins::boolean::boolean_prototype_value_of,
0
),
(
"toString",
crate::builtins::boolean::boolean_prototype_to_string,
0
),
);
bind_constructor_hash!(