refactor: lower 编码实现按值移交,原 lower 降为克隆包装

This commit is contained in:
2026-10-12 14:01:37 +00:00
parent 7cf3020bde
commit b7b6d43d05
4 changed files with 40 additions and 32 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
use oxide_bytecode::module::CompiledModule;
use oxide_emit::Emitter;
use oxide_ir::lower::lower;
use oxide_ir::lower::lower_owned;
/// 结构哈希 / 编译模块哈希 re-export(供编译缓存作键)。
pub use crate::hash::{compiled_module_hash, structural_hash};
@@ -134,7 +134,7 @@ impl Compiler {
crate::compiler_debug!("compile: after regalloc {} insts", ir.insts.len());
}
crate::compiler_debug!("compile: done, {} instructions", ir.insts.len());
let mut module = lower(&ir)?;
let mut module = lower_owned(ir)?;
crate::flatten::flatten_submodules(&mut module);
Ok(module)
}