Struct wasmer_runtime_core_fl::trampoline_x64::TrampolineBufferBuilder[][src]

pub struct TrampolineBufferBuilder { /* fields omitted */ }
Expand description

Trampoline Buffer Builder.

Implementations

Creates a new empty TrampolineBufferBuilder.

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.

Adds context RSP state preserving trampoline to the buffer.

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.

Inserts this trampoline to the global trampoline buffer.

Removes the trampoline pointed to by ptr from the global trampoline buffer. Panics if ptr does not point to any trampoline.

Safety

Calling this function invalidates the trampoline ptr points to and recycles its memory. You should ensure that ptr isn’t used after calling remove_global.

Gets the current (non-executable) code in this builder.

Consumes the builder and builds the trampoline buffer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.