refactor: 内置八文件续迁内核访问器调用至能力方法

This commit is contained in:
2026-10-08 07:52:57 +00:00
parent 8a67117497
commit 5970f804d7
10 changed files with 51 additions and 60 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ use oxide_kernel::shape_forge::EMPTY_SHAPE_ID;
use oxide_types::object::{JsObject, MAX_DENSE_PROPS};
use oxide_types::value::JsValue;
use oxide_runtime_api::{NativeResult, VmHost};
use oxide_runtime_api::{NativeResult, ProtoKind, VmHost};
use super::from::from_engine_error;
@@ -262,7 +262,7 @@ pub(crate) fn require_callback<H: VmHost>(vm: &mut H, callback_val: JsValue) ->
}
pub(crate) fn create_new_array<H: VmHost>(vm: &mut H, n: usize) -> *mut JsObject {
let proto = vm.session().builtin_world().array_proto.as_ptr() as *mut JsObject;
let proto = vm.builtin_proto(ProtoKind::ArrayProto);
vm.alloc_object(JsObject::new_array(
EMPTY_SHAPE_ID,
JsValue::from_js_object(proto),