mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-24 09:19:25 +00:00
Merge remote-tracking branch 'origin/master' into middleware
This commit is contained in:
@ -120,31 +120,33 @@ impl Compiler for SinglepassCompiler {
|
||||
.into_iter()
|
||||
.collect::<PrimaryMap<LocalFunctionIndex, CompiledFunction>>();
|
||||
|
||||
Ok(Compilation::new(functions, import_trampolines, None))
|
||||
}
|
||||
|
||||
fn compile_function_call_trampolines(
|
||||
&self,
|
||||
signatures: &[FunctionType],
|
||||
) -> Result<Vec<FunctionBody>, CompileError> {
|
||||
Ok(signatures
|
||||
let function_call_trampolines = module
|
||||
.signatures
|
||||
.values()
|
||||
.collect::<Vec<_>>()
|
||||
.par_iter()
|
||||
.cloned()
|
||||
.map(gen_std_trampoline)
|
||||
.collect())
|
||||
}
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter()
|
||||
.collect::<PrimaryMap<_, _>>();
|
||||
|
||||
fn compile_dynamic_function_trampolines(
|
||||
&self,
|
||||
signatures: &[FunctionType],
|
||||
) -> Result<PrimaryMap<FunctionIndex, FunctionBody>, CompileError> {
|
||||
let vmoffsets = VMOffsets::new_for_trampolines(8);
|
||||
Ok(signatures
|
||||
let dynamic_function_trampolines = module
|
||||
.imported_function_types()
|
||||
.collect::<Vec<_>>()
|
||||
.par_iter()
|
||||
.map(|func_type| gen_std_dynamic_import_trampoline(&vmoffsets, &func_type))
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter()
|
||||
.collect::<PrimaryMap<FunctionIndex, FunctionBody>>())
|
||||
.collect::<PrimaryMap<FunctionIndex, FunctionBody>>();
|
||||
|
||||
Ok(Compilation::new(
|
||||
functions,
|
||||
import_trampolines,
|
||||
function_call_trampolines,
|
||||
dynamic_function_trampolines,
|
||||
None,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user