feat: for-of 异常中断按规范关闭迭代器,next() 抛错可捕获并保留原始值

This commit is contained in:
爱特每羊队
2026-06-27 18:28:07 +08:00
parent 09a9d3dfd2
commit 11d69ea95c
8 changed files with 263 additions and 9 deletions
+2
View File
@@ -177,6 +177,7 @@ impl Vm {
catch_pc,
finally_pc: None,
frame_depth: self.frames.len(),
for_of_depth: self.iters.for_of_iters.len(),
});
}
@@ -193,6 +194,7 @@ impl Vm {
catch_pc: None,
finally_pc: Some(finally_pc),
frame_depth: self.frames.len(),
for_of_depth: self.iters.for_of_iters.len(),
});
}