mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 13:18:20 +00:00
Fix the build post-merge that picked up SymbolRegistry.
This commit is contained in:
@@ -73,13 +73,13 @@ impl SymbolRegistry for ShortNames {
|
||||
}
|
||||
|
||||
impl LLVMCompiler {
|
||||
fn compile_native_object<'data, 'module>(
|
||||
fn _compile_native_object<'data, 'module>(
|
||||
&self,
|
||||
target: &Target,
|
||||
compile_info: &'module CompileModuleInfo,
|
||||
module_translation: &ModuleTranslationState,
|
||||
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
|
||||
namer: &dyn CompilationNamer,
|
||||
symbol_registry: &dyn SymbolRegistry,
|
||||
) -> Result<Vec<u8>, CompileError> {
|
||||
let target_machine = self.config().target_machine(target);
|
||||
let ctx = Context::create();
|
||||
@@ -98,10 +98,6 @@ impl LLVMCompiler {
|
||||
FuncTranslator::new(target_machine)
|
||||
},
|
||||
|func_translator, (i, input)| {
|
||||
let mut namer = CachingInvertibleCompilationNamer {
|
||||
cache: HashMap::new(),
|
||||
namer,
|
||||
};
|
||||
let module = func_translator.translate_to_module(
|
||||
&compile_info.module,
|
||||
module_translation,
|
||||
@@ -110,7 +106,7 @@ impl LLVMCompiler {
|
||||
self.config(),
|
||||
&compile_info.memory_styles,
|
||||
&compile_info.table_styles,
|
||||
&mut namer,
|
||||
symbol_registry,
|
||||
)?;
|
||||
Ok(module.write_bitcode_to_memory().as_slice().to_vec())
|
||||
},
|
||||
|
||||
@@ -75,8 +75,8 @@ impl FuncTranslator {
|
||||
config: &LLVM,
|
||||
memory_styles: &PrimaryMap<MemoryIndex, MemoryStyle>,
|
||||
_table_styles: &PrimaryMap<TableIndex, TableStyle>,
|
||||
symbol_registry: &mut dyn SymbolRegistry,
|
||||
) -> Result<CompiledFunction, CompileError> {
|
||||
symbol_registry: &dyn SymbolRegistry,
|
||||
) -> Result<Module, CompileError> {
|
||||
// The function type, used for the callbacks.
|
||||
let function = CompiledFunctionKind::Local(*local_func_index);
|
||||
let func_index = wasm_module.func_index(*local_func_index);
|
||||
@@ -269,6 +269,7 @@ impl FuncTranslator {
|
||||
if let Some(ref callbacks) = config.callbacks {
|
||||
callbacks.postopt_ir(&function, &module);
|
||||
}
|
||||
|
||||
Ok(module)
|
||||
}
|
||||
|
||||
@@ -281,7 +282,7 @@ impl FuncTranslator {
|
||||
config: &LLVM,
|
||||
memory_styles: &PrimaryMap<MemoryIndex, MemoryStyle>,
|
||||
table_styles: &PrimaryMap<TableIndex, TableStyle>,
|
||||
namer: &mut dyn crate::compiler::InvertibleCompilationNamer,
|
||||
symbol_registry: &dyn SymbolRegistry,
|
||||
) -> Result<CompiledFunction, CompileError> {
|
||||
let module = self.translate_to_module(
|
||||
wasm_module,
|
||||
@@ -291,7 +292,7 @@ impl FuncTranslator {
|
||||
config,
|
||||
memory_styles,
|
||||
table_styles,
|
||||
namer,
|
||||
symbol_registry,
|
||||
)?;
|
||||
let function = CompiledFunctionKind::Local(*local_func_index);
|
||||
let target_machine = &self.target_machine;
|
||||
@@ -1309,7 +1310,7 @@ pub struct LLVMFunctionCodeGenerator<'ctx, 'a> {
|
||||
module: &'a Module<'ctx>,
|
||||
module_translation: &'a ModuleTranslationState,
|
||||
wasm_module: &'a ModuleInfo,
|
||||
symbol_registry: &'a mut dyn SymbolRegistry,
|
||||
symbol_registry: &'a dyn SymbolRegistry,
|
||||
}
|
||||
|
||||
impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
|
||||
|
||||
Reference in New Issue
Block a user