mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-27 12:11:12 +08:00
perf: f64 转字符串去中间分配并加整数 double 快路径
This commit is contained in:
@@ -302,7 +302,7 @@ fn jsvalue_to_json<H: VmHost>(
|
||||
if !n.is_finite() {
|
||||
out.push_str("null");
|
||||
} else {
|
||||
out.push_str(&oxide_runtime_api::js_number_to_string(n));
|
||||
oxide_runtime_api::write_number_into(n, out);
|
||||
}
|
||||
} else if val.is_string() {
|
||||
let s = unsafe { (*val.as_string_ptr()).to_owned_string() };
|
||||
|
||||
Reference in New Issue
Block a user