mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-26 23:21:35 +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:
@ -52,16 +52,21 @@ impl fmt::Display for WasmTrapInfo {
|
||||
/// of the `Func` struct.
|
||||
pub trait Kind {}
|
||||
|
||||
pub type Trampoline = unsafe extern "C" fn(*mut Ctx, NonNull<vm::Func>, *const u64, *mut u64);
|
||||
pub type Trampoline = unsafe extern "C" fn(
|
||||
vmctx: *mut Ctx,
|
||||
func: NonNull<vm::Func>,
|
||||
args: *const u64,
|
||||
rets: *mut u64,
|
||||
);
|
||||
pub type Invoke = unsafe extern "C" fn(
|
||||
Trampoline,
|
||||
*mut Ctx,
|
||||
NonNull<vm::Func>,
|
||||
*const u64,
|
||||
*mut u64,
|
||||
*mut WasmTrapInfo,
|
||||
*mut Option<Box<dyn Any>>,
|
||||
Option<NonNull<c_void>>,
|
||||
trampoline: Trampoline,
|
||||
vmctx: *mut Ctx,
|
||||
func: NonNull<vm::Func>,
|
||||
args: *const u64,
|
||||
rets: *mut u64,
|
||||
trap_info: *mut WasmTrapInfo,
|
||||
user_error: *mut Option<Box<dyn Any>>,
|
||||
extra: Option<NonNull<c_void>>,
|
||||
) -> bool;
|
||||
|
||||
/// TODO(lachlan): Naming TBD.
|
||||
|
Reference in New Issue
Block a user