mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-24 09:19:25 +00:00
Make compilers to take non-mutable inputs
This commit is contained in:
@ -41,12 +41,17 @@ impl SinglepassCompiler {
|
||||
}
|
||||
|
||||
impl Compiler for SinglepassCompiler {
|
||||
/// Get the middlewares for this compiler
|
||||
fn get_middlewares(&self) -> Vec<Arc<dyn ModuleMiddleware>> {
|
||||
self.config.get_middlewares()
|
||||
}
|
||||
|
||||
/// Compile the module using Singlepass, producing a compilation result with
|
||||
/// associated relocations.
|
||||
fn compile_module(
|
||||
&self,
|
||||
target: &Target,
|
||||
compile_info: &mut CompileModuleInfo,
|
||||
compile_info: &CompileModuleInfo,
|
||||
_module_translation: &ModuleTranslationState,
|
||||
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'_>>,
|
||||
) -> Result<Compilation, CompileError> {
|
||||
@ -63,9 +68,6 @@ impl Compiler for SinglepassCompiler {
|
||||
}
|
||||
let memory_styles = &compile_info.memory_styles;
|
||||
let table_styles = &compile_info.table_styles;
|
||||
let mut module = (*compile_info.module).clone();
|
||||
self.config.middlewares.apply_on_module_info(&mut module);
|
||||
compile_info.module = Arc::new(module);
|
||||
let vmoffsets = VMOffsets::new(8, &compile_info.module);
|
||||
let module = &compile_info.module;
|
||||
let import_trampolines: PrimaryMap<SectionIndex, _> = (0..module.num_imported_functions)
|
||||
|
Reference in New Issue
Block a user