perf: 子模块树改 Arc 共享,run() 免深拷贝模块树

This commit is contained in:
爱特每羊队
2026-08-10 16:26:57 +08:00
parent cd96fa6fcb
commit c90c610e15
6 changed files with 25 additions and 17 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ pub fn lower(f: &IRFunction) -> Result<CompiledModule, String> {
let mut sub_modules = Vec::with_capacity(f.nested.len());
for nested in &f.nested {
sub_modules.push(lower(nested)?);
sub_modules.push(Arc::new(lower(nested)?));
}
Ok(CompiledModule {