perf: new_string_owned 零拷贝路径替代 new_string 二次克隆

This commit is contained in:
2026-08-13 14:55:08 +08:00
parent d2c21c3a4a
commit 3ad80d6ed4
10 changed files with 42 additions and 37 deletions
+3
View File
@@ -1805,6 +1805,9 @@ impl oxide_runtime_api::VmHost for Vm {
fn new_string(&mut self, s: &str) -> JsValue {
self.new_string(s)
}
fn new_string_owned(&mut self, s: String) -> JsValue {
Vm::new_string_owned(self, s)
}
fn new_bigint(&mut self, v: num_bigint::BigInt) -> JsValue {
Vm::new_bigint(self, v)
}