feat: 实现for-of与解构赋值

This commit is contained in:
爱特每羊队
2026-06-14 23:45:12 +08:00
parent c766d69d0a
commit 21e3693c63
15 changed files with 891 additions and 81 deletions
+3
View File
@@ -44,6 +44,7 @@ impl Vm {
symbol_descriptions: Vec::new(),
symbol_registry: std::collections::HashMap::new(),
for_of_iters: Vec::new(),
last_for_of_result: JsValue::undefined(),
root_reg_limit: 0,
active_reg_limit: 0,
native_call_depth: 0,
@@ -80,6 +81,7 @@ impl Vm {
symbol_descriptions: Vec::new(),
symbol_registry: std::collections::HashMap::new(),
for_of_iters: Vec::new(),
last_for_of_result: JsValue::undefined(),
root_reg_limit: 0,
active_reg_limit: 0,
native_call_depth: 0,
@@ -115,6 +117,7 @@ impl Vm {
self.frames.clear();
self.for_in_iters.clear();
self.for_of_iters.clear();
self.last_for_of_result = JsValue::undefined();
self.saved_bytecode_stack.clear();
self.saved_constants_stack.clear();
self.try_stack.clear();