Move all trampoline compilation to wasmtime-cranelift (#3176)
* Move all trampoline compilation to `wasmtime-cranelift` This commit moves compilation of all the trampolines used in wasmtime behind the `Compiler` trait object to live in `wasmtime-cranelift`. The long-term goal of this is to enable depending on cranelift *only* from the `wasmtime-cranelift` crate, so by moving these dependencies we should make that a little more flexible. * Fix windows build
This commit is contained in:
@@ -9,7 +9,7 @@ use cranelift_codegen::isa;
|
||||
use lightbeam::{CodeGenSession, NullOffsetSink, Sinks};
|
||||
use wasmtime_environ::wasm::{
|
||||
DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, FuncIndex,
|
||||
GlobalIndex, MemoryIndex, TableIndex, TypeIndex,
|
||||
GlobalIndex, MemoryIndex, TableIndex, TypeIndex, WasmFuncType,
|
||||
};
|
||||
use wasmtime_environ::{
|
||||
BuiltinFunctionIndex, CompileError, CompiledFunction, Compiler, FunctionBodyData, Module,
|
||||
@@ -75,6 +75,23 @@ impl Compiler for Lightbeam {
|
||||
jt_offsets: Default::default(),
|
||||
})
|
||||
}
|
||||
|
||||
fn host_to_wasm_trampoline(
|
||||
&self,
|
||||
_isa: &dyn isa::TargetIsa,
|
||||
_ty: &WasmFuncType,
|
||||
) -> Result<CompiledFunction, CompileError> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn wasm_to_host_trampoline(
|
||||
&self,
|
||||
_isa: &dyn isa::TargetIsa,
|
||||
_ty: &WasmFuncType,
|
||||
_host_fn: usize,
|
||||
) -> Result<CompiledFunction, CompileError> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
/// Implementation of a relocation sink that just saves all the information for later
|
||||
|
||||
Reference in New Issue
Block a user