mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
refactor: lower 编码实现按值移交,原 lower 降为克隆包装
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user