mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 21:21:33 +00:00
fix(runtime-core) Share the definition of Trampoline
across all the backends.
This patch updates all the backends to use the definition of `Trampoline` as defined in the `wasmer_runtime_core::typed_func` module. That way, there is no copy of that type, and as such, it is easier to avoid regression (a simple `cargo check` does the job). This patch also formats the `use` statements in the updated files.
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
use crate::relocation::{TrapData, TrapSink};
|
||||
use crate::resolver::FuncResolver;
|
||||
use crate::trampoline::Trampolines;
|
||||
use crate::{
|
||||
relocation::{TrapData, TrapSink},
|
||||
resolver::FuncResolver,
|
||||
trampoline::Trampolines,
|
||||
};
|
||||
use libc::c_void;
|
||||
use std::{any::Any, cell::Cell, ptr::NonNull, sync::Arc};
|
||||
use wasmer_runtime_core::{
|
||||
backend::RunnableModule,
|
||||
module::ModuleInfo,
|
||||
typed_func::{Wasm, WasmTrapInfo},
|
||||
typed_func::{Trampoline, Wasm, WasmTrapInfo},
|
||||
types::{LocalFuncIndex, SigIndex},
|
||||
vm,
|
||||
};
|
||||
@ -59,7 +61,7 @@ impl RunnableModule for Caller {
|
||||
|
||||
fn get_trampoline(&self, _: &ModuleInfo, sig_index: SigIndex) -> Option<Wasm> {
|
||||
unsafe extern "C" fn invoke(
|
||||
trampoline: unsafe extern "C" fn(*mut vm::Ctx, NonNull<vm::Func>, *const u64, *mut u64),
|
||||
trampoline: Trampoline,
|
||||
ctx: *mut vm::Ctx,
|
||||
func: NonNull<vm::Func>,
|
||||
args: *const u64,
|
||||
|
Reference in New Issue
Block a user