feat: async/await 语法支持(AWAIT 帧快照挂起/恢复 + 微任务驱动 + AsyncFunction intrinsics)

This commit is contained in:
2026-08-09 22:02:15 +08:00
parent 538a5670dc
commit fd47cd56d0
28 changed files with 1055 additions and 28 deletions
@@ -35,6 +35,8 @@ impl Emitter {
let body_stmts: &[Statement] = if let Some(body) = &fd.body { &body.statements } else { &[] };
let mut sub_module = if fd.generator {
self.compile_generator_body(&param_names, body_stmts, ctx)?
} else if fd.r#async {
self.compile_async_body(&param_names, body_stmts, ctx, false, false)?
} else {
self.compile_function_body(&param_names, body_stmts, ctx, false, false)?
};