fix: 子模块全局扁平化根治逃逸闭包上下文错位

This commit is contained in:
2026-08-07 10:49:15 +08:00
parent 98b07687f0
commit fd94ff6931
10 changed files with 137 additions and 62 deletions
+3 -1
View File
@@ -58,7 +58,9 @@ impl Compiler {
oxide_regalloc::alloc(&mut ir, &live2)?; // 无可行染色 → RangeError 上抛
}
crate::compiler_debug!("compile: done, {} instructions", ir.insts.len());
lower(&ir)
let mut module = lower(&ir)?;
crate::flatten::flatten_submodules(&mut module);
Ok(module)
}
}