perf: 子模块树改 Arc 共享,run() 免深拷贝模块树
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user