Don't return CodeInfo from Context::compile_and_emit
It is already available through ctx.mach_compile_result and rarely needed.
This commit is contained in:
@@ -652,11 +652,6 @@ impl Module for JITModule {
|
||||
stack_map_sink: &mut dyn StackMapSink,
|
||||
) -> ModuleResult<ModuleCompiledFunction> {
|
||||
info!("defining function {}: {}", id, ctx.func.display());
|
||||
let CodeInfo {
|
||||
total_size: code_size,
|
||||
..
|
||||
} = ctx.compile(self.isa())?;
|
||||
|
||||
let decl = self.declarations.get_function_decl(id);
|
||||
if !decl.linkage.is_definable() {
|
||||
return Err(ModuleError::InvalidImportDefinition(decl.name.clone()));
|
||||
@@ -666,6 +661,11 @@ impl Module for JITModule {
|
||||
return Err(ModuleError::DuplicateDefinition(decl.name.to_owned()));
|
||||
}
|
||||
|
||||
let CodeInfo {
|
||||
total_size: code_size,
|
||||
..
|
||||
} = ctx.compile(self.isa())?;
|
||||
|
||||
let size = code_size as usize;
|
||||
let ptr = self
|
||||
.memory
|
||||
|
||||
Reference in New Issue
Block a user