Skip to content

Commit

Permalink
Prepare to abstract rayon away by minimizing the API we use
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Apr 26, 2021
1 parent 861fe48 commit 7ad7543
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/compiler-singlepass/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ impl Compiler for SinglepassCompiler {
let functions = function_body_inputs
.iter()
.collect::<Vec<(LocalFunctionIndex, &FunctionBodyData<'_>)>>()
.par_iter()
.into_par_iter()
.map(|(i, input)| {
let middleware_chain = self
.config
.middlewares
.generate_function_middleware_chain(*i);
.generate_function_middleware_chain(i);
let mut reader =
MiddlewareBinaryReader::new_with_offset(input.data, input.module_offset);
reader.set_middleware_chain(middleware_chain);
Expand All @@ -107,7 +107,7 @@ impl Compiler for SinglepassCompiler {
&vmoffsets,
&memory_styles,
&table_styles,
*i,
i,
&locals,
)
.map_err(to_compile_error)?;
Expand All @@ -128,8 +128,7 @@ impl Compiler for SinglepassCompiler {
.signatures
.values()
.collect::<Vec<_>>()
.par_iter()
.cloned()
.into_par_iter()
.map(gen_std_trampoline)
.collect::<Vec<_>>()
.into_iter()
Expand All @@ -138,7 +137,7 @@ impl Compiler for SinglepassCompiler {
let dynamic_function_trampolines = module
.imported_function_types()
.collect::<Vec<_>>()
.par_iter()
.into_par_iter()
.map(|func_type| gen_std_dynamic_import_trampoline(&vmoffsets, &func_type))
.collect::<Vec<_>>()
.into_iter()
Expand Down

0 comments on commit 7ad7543

Please sign in to comment.