feat: 提取 oxide_builtins 独立 crate,泛型化 <H: VmHost>

This commit is contained in:
爱特每羊队
2026-06-25 22:38:23 +08:00
parent ffc0916a6b
commit 2f5d91bd48
72 changed files with 1983 additions and 1595 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
use crate::coercion;
use crate::vm::Vm;
use oxide_runtime_api as coercion;
use oxide_types::value::JsValue;
impl Vm {
+1 -1
View File
@@ -54,7 +54,7 @@ impl Vm {
format!("{err_val}")
};
builtins_debug!("native_call err={}", msg);
(crate::builtins::error::create_error(self, &msg), "Error")
(oxide_builtins::error::create_error(self, &msg), "Error")
};
self.exception_value = Some(error);
self.pending_error_kind = Some(kind);
+1 -1
View File
@@ -1,5 +1,5 @@
use crate::coercion;
use crate::vm::Vm;
use oxide_runtime_api as coercion;
use oxide_types::value::JsValue;
impl Vm {
+1 -1
View File
@@ -1,6 +1,6 @@
use crate::coercion;
use crate::vm::Vm;
use oxide_bytecode::opcode::{self, Instr};
use oxide_runtime_api as coercion;
use oxide_types::value::JsValue;
impl Vm {
+1 -1
View File
@@ -2,8 +2,8 @@ use oxide_bytecode::opcode::OpCode;
use oxide_types::object::JsObject;
use oxide_types::value::JsValue;
use crate::coercion;
use crate::vm::Vm;
use oxide_runtime_api as coercion;
impl Vm {
pub(crate) fn dispatch_member_op(&mut self, op: OpCode, rd: usize, a: usize, b: usize) -> Result<(), String> {