feat: 编译管线/类型层 crate 补全多级日志宏 + 关键路径日志

This commit is contained in:
2026-08-10 17:56:28 +08:00
parent 9fa8ae5b5f
commit 8a53bfb584
34 changed files with 421 additions and 1 deletions
+1
View File
@@ -1270,6 +1270,7 @@ impl Emitter {
/// 调用方为 `oxide_compiler::Compiler::compile`:本函数完成 emit 半程,
/// 随后由 `oxide_ir::lower::lower` 降为字节码。
pub fn emit_program(&self, program: &oxide_parser::Program) -> Result<IRFunction, String> {
crate::emit_debug!("emit_program: {} stmts", program.body.len());
let mut ctx = CompileCtx::new();
// 脚本顶层:var/function 声明需落到全局对象,let/const/class 不进全局。
ctx.is_global_scope = true;