Reverse trampoline static generation now works! 🎉

This commit is contained in:
Syrus
2020-05-14 19:28:36 -07:00
parent 33cd21b3d8
commit f38720337f
9 changed files with 112 additions and 88 deletions

View File

@@ -9,7 +9,9 @@ use crate::target::Target;
use crate::FunctionBodyData;
use crate::ModuleTranslationState;
use wasm_common::entity::PrimaryMap;
use wasm_common::{Features, FunctionType, LocalFunctionIndex, MemoryIndex, TableIndex};
use wasm_common::{
Features, FunctionIndex, FunctionType, LocalFunctionIndex, MemoryIndex, TableIndex,
};
use wasmer_runtime::Module;
use wasmer_runtime::{MemoryPlan, TablePlan};
use wasmparser::{validate, OperatorValidatorConfig, ValidatingParserConfig};
@@ -102,13 +104,8 @@ pub trait Compiler {
/// }
/// }
/// ```
fn compile_wasm2host_trampoline(
fn compile_wasm2host_trampolines(
&self,
signature: &FunctionType,
callee_address: usize,
) -> Result<FunctionBody, CompileError>;
// fn compile_wasm2host_trampolines(
// &self,
// signatures: &[FunctionType],
// ) -> Result<Vec<FunctionBody>, CompileError>;
module: &Module,
) -> Result<PrimaryMap<FunctionIndex, FunctionBody>, CompileError>;
}