Middleware for LLVM.

This commit is contained in:
losfair
2020-06-16 00:56:43 +08:00
parent 1144222d15
commit 1bbaafb819
2 changed files with 19 additions and 2 deletions

View File

@ -32,7 +32,8 @@ use wasm_common::{
use wasmer_compiler::wasmparser::{MemoryImmediate, Operator};
use wasmer_compiler::{
to_wasm_error, wptype_to_type, CompileError, CompiledFunction, CustomSections,
FunctionBodyData, MiddlewareBinaryReader, ModuleTranslationState, RelocationTarget,
FunctionBodyData, GenerateMiddlewareChain, MiddlewareBinaryReader, ModuleTranslationState,
RelocationTarget,
};
use wasmer_runtime::{MemoryPlan, ModuleInfo, TablePlan};
@ -133,6 +134,11 @@ impl FuncTranslator {
function_body.data,
function_body.module_offset,
);
reader.set_middleware_chain(
config
.middlewares
.generate_middleware_chain(*local_func_index),
);
let mut params = vec![];
let first_param =