mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 03:01:12 +08:00
refactor: 字符串值改用 JsString 指针表示,键与字面量改用 PermInterner
This commit is contained in:
@@ -13,10 +13,7 @@ fn eval(source: &str) -> Result<(Vm, JsValue), String> {
|
||||
}
|
||||
|
||||
fn to_str(vm: &Vm, val: JsValue) -> String {
|
||||
vm.kernel_core()
|
||||
.string_forge()
|
||||
.lookup(val.as_string_index())
|
||||
.unwrap_or_default()
|
||||
vm.lookup_str(val).unwrap_or_default()
|
||||
}
|
||||
|
||||
fn assert_num_eq(val: JsValue, expected: f64) {
|
||||
|
||||
Reference in New Issue
Block a user