docs: 补充注释与格式化

This commit is contained in:
爱特每羊队
2026-08-06 23:10:27 +08:00
parent 4e0fd762c2
commit 328b8a3ddc
156 changed files with 2393 additions and 1687 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
//! IR 中间表示:AST→IR→字节码 流水线的程序表示。
//!
//! 单一程序表示(D-01),分域组合(D-02):
//! 单一程序表示,分域组合:
//! - code: 指令流 + label 位置
//! - data: 常量池
//! - bindings: 参数布局
@@ -52,8 +52,8 @@ pub struct IRFunction {
pub needs_home_object: bool,
pub captured_this_const_idx: u16,
pub function_name: Option<String>,
/// 本函数是否为顶层脚本函数(D-19):顶层 STORE_VAR 全局可观察(B008)不可删,
/// 函数内局部 STORE_VAR 才可被精确 DCE 删除。emit 在 assemble_ir 处由
/// 本函数是否为顶层脚本函数:顶层 STORE_VAR 写全局可观察状态,不可被精确 DCE
/// 删除;函数内局部 STORE_VAR 才可删。emit 在 assemble_ir 处由
/// `parent_ctx.is_none()` 填充;nested/手工构造默认 false。
pub is_top_level: bool,
pub const_overflow: bool,