refactor: CompileCtx 拆分为 LabelCtx/ScopeCtx,字面量域改用注册表入口

This commit is contained in:
2026-06-25 19:46:35 +08:00
parent d195d7615c
commit f7bcfd3846
17 changed files with 180 additions and 113 deletions
@@ -43,7 +43,7 @@ impl Compiler {
// LabeledEnd target right after the body for `break label`.
let id = ctx.next_label_id();
self.count_statement(&stmt.body, ctx);
ctx.label_map.insert(Label::LabeledEnd(id), ctx.projected_pc);
ctx.labels.label_map.insert(Label::LabeledEnd(id), ctx.projected_pc);
}
}
}