feat: for-await-of 逃出关闭异步 await return() 结算后恢复帧

This commit is contained in:
2026-09-27 19:48:19 +00:00
parent c9f8597491
commit 9ab19fb472
11 changed files with 457 additions and 65 deletions
+4
View File
@@ -92,6 +92,7 @@ impl Vm {
pending_exception: None,
pending_error_kind: None,
pending_completion: None,
pending_async_escape: None,
root_reg_limit: 0,
active_reg_limit: 0,
native_call_depth: 0,
@@ -229,6 +230,7 @@ impl Vm {
pending_exception: None,
pending_error_kind: None,
pending_completion: None,
pending_async_escape: None,
root_reg_limit: 0,
active_reg_limit: 0,
native_call_depth: 0,
@@ -536,6 +538,8 @@ impl Vm {
self.pending_exception = None;
self.pending_error_kind = None;
self.pending_completion = None;
// 在途异步逃出是执行期状态:跨 run/reset 不保留,残留将悬垂。
self.pending_async_escape = None;
self.generator_suspended = None;
self.delegated_iterator = None;
self.generator_dispatch = false;