mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
perf: 寄存器保存改用共享 save_stack,消除 Box<[JsValue]> 堆分配
This commit is contained in:
@@ -42,6 +42,7 @@ impl Vm {
|
||||
sub_module_constants: Vec::new(),
|
||||
saved_bytecode_stack: Vec::new(),
|
||||
saved_constants_stack: Vec::new(),
|
||||
save_stack: Vec::new(),
|
||||
try_stack: Vec::new(),
|
||||
exception_value: None,
|
||||
pending_exception: None,
|
||||
@@ -88,6 +89,7 @@ impl Vm {
|
||||
sub_module_constants: Vec::new(),
|
||||
saved_bytecode_stack: Vec::new(),
|
||||
saved_constants_stack: Vec::new(),
|
||||
save_stack: Vec::new(),
|
||||
try_stack: Vec::new(),
|
||||
exception_value: None,
|
||||
pending_exception: None,
|
||||
@@ -174,6 +176,7 @@ impl Vm {
|
||||
self.last_for_of_result = JsValue::undefined();
|
||||
self.saved_bytecode_stack.clear();
|
||||
self.saved_constants_stack.clear();
|
||||
self.save_stack.clear();
|
||||
self.try_stack.clear();
|
||||
self.exception_value = None;
|
||||
self.pending_exception = None;
|
||||
|
||||
Reference in New Issue
Block a user