[−][src]Struct wasmer_runtime_core::trampoline_x64::TrampolineBufferBuilder
Trampoline Buffer Builder.
Methods
impl TrampolineBufferBuilder
[src]
pub fn new() -> TrampolineBufferBuilder
[src]
Creates a new empty TrampolineBufferBuilder
.
pub fn add_context_trampoline(
&mut self,
target: *const CallTarget,
context: *const CallContext
) -> usize
[src]
&mut self,
target: *const CallTarget,
context: *const CallContext
) -> usize
Adds a context trampoline.
This generates a transparent trampoline function that forwards any call to target
with
unmodified params/returns. When called from the trampoline, target
will have access to
the context
specified here through get_context()
.
Note that since rax
is overwritten internally, variadic functions are not supported as target
.
pub fn add_context_rsp_state_preserving_trampoline(
&mut self,
target: unsafe extern "C" fn(_: &mut Ctx, _: *const CallContext, _: *const u64),
context: *const CallContext
) -> usize
[src]
&mut self,
target: unsafe extern "C" fn(_: &mut Ctx, _: *const CallContext, _: *const u64),
context: *const CallContext
) -> usize
Adds context RSP state preserving trampoline to the buffer.
pub fn add_callinfo_trampoline(
&mut self,
target: unsafe extern "C" fn(_: *const CallContext, _: *const u64) -> u64,
context: *const CallContext,
num_params: u32
) -> usize
[src]
&mut self,
target: unsafe extern "C" fn(_: *const CallContext, _: *const u64) -> u64,
context: *const CallContext,
num_params: u32
) -> usize
Adds a callinfo trampoline.
This generates a trampoline function that collects num_params
parameters into an array
and passes the array into target
as the second argument when called. The first argument
of target
is the context
specified here.
Note that non-integer parameters/variadic functions are not supported.
pub fn build(self) -> TrampolineBuffer
[src]
Consumes the builder and builds the trampoline buffer.
Auto Trait Implementations
impl RefUnwindSafe for TrampolineBufferBuilder
impl Send for TrampolineBufferBuilder
impl Sync for TrampolineBufferBuilder
impl Unpin for TrampolineBufferBuilder
impl UnwindSafe for TrampolineBufferBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,