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

This commit is contained in:
爱特每羊队
2026-08-09 22:02:15 +08:00
parent dcbe3d9320
commit 0d9e6eabc9
28 changed files with 1055 additions and 28 deletions
+3
View File
@@ -52,6 +52,8 @@ pub struct IRFunction {
pub needs_home_object: bool,
/// 是否为生成器函数体(`function*`)。
pub is_generator: bool,
/// 是否为异步函数体(`async function` / async 箭头)。
pub is_async: bool,
pub captured_this_const_idx: u16,
pub function_name: Option<String>,
/// 函数 `length` 属性值:第一个带默认值/解构默认的形参之前的形参数(rest 不计)。
@@ -83,6 +85,7 @@ impl IRFunction {
is_derived_constructor: false,
needs_home_object: false,
is_generator: false,
is_async: false,
captured_this_const_idx: 0,
function_name: None,
function_length: 0,