mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-24 17:29:26 +00:00
Use middleware reader
This commit is contained in:
@ -11,10 +11,10 @@ use rayon::prelude::{IntoParallelIterator, IntoParallelRefIterator, ParallelIter
|
||||
use wasm_common::entity::{EntityRef, PrimaryMap};
|
||||
use wasm_common::Features;
|
||||
use wasm_common::{FunctionIndex, FunctionType, LocalFunctionIndex, MemoryIndex, TableIndex};
|
||||
use wasmer_compiler::wasmparser::{BinaryReader, BinaryReaderError};
|
||||
use wasmer_compiler::wasmparser::BinaryReaderError;
|
||||
use wasmer_compiler::TrapInformation;
|
||||
use wasmer_compiler::{Compilation, CompileError, CompiledFunction, Compiler, SectionIndex};
|
||||
use wasmer_compiler::{CompilerConfig, ModuleTranslationState, Target};
|
||||
use wasmer_compiler::{CompilerConfig, MiddlewareBinaryReader, ModuleTranslationState, Target};
|
||||
use wasmer_compiler::{FunctionBody, FunctionBodyData};
|
||||
use wasmer_runtime::ModuleInfo;
|
||||
use wasmer_runtime::TrapCode;
|
||||
@ -77,7 +77,8 @@ impl Compiler for SinglepassCompiler {
|
||||
.collect::<Vec<(LocalFunctionIndex, &FunctionBodyData<'_>)>>()
|
||||
.par_iter()
|
||||
.map(|(i, input)| {
|
||||
let mut reader = BinaryReader::new_with_offset(input.data, input.module_offset);
|
||||
let mut reader =
|
||||
MiddlewareBinaryReader::new_with_offset(input.data, input.module_offset);
|
||||
|
||||
// This local list excludes arguments.
|
||||
let mut locals = vec![];
|
||||
|
Reference in New Issue
Block a user