Enum aha_wit_parser::abi::WitxInstruction
source · [−]pub enum WitxInstruction<'a> {
AddrOf,
I32FromPointer,
I32FromConstPointer,
PointerFromI32 {
ty: &'a Type,
},
ConstPointerFromI32 {
ty: &'a Type,
},
ReuseReturn,
}Variants
AddrOf
Takes the value off the top of the stack and writes it into linear
memory. Pushes the address in linear memory as an i32.
I32FromPointer
Converts a language-specific pointer value to a wasm i32.
I32FromConstPointer
Converts a language-specific pointer value to a wasm i32.
PointerFromI32
Fields
ty: &'a TypeConverts a native wasm i32 to a language-specific pointer.
ConstPointerFromI32
Fields
ty: &'a TypeConverts a native wasm i32 to a language-specific pointer.
ReuseReturn
This is a special instruction specifically for the original ABI of
WASI. The raw return i32 of a function is re-pushed onto the
stack for reuse.
Implementations
sourceimpl WitxInstruction<'_>
impl WitxInstruction<'_>
sourcepub fn operands_len(&self) -> usize
pub fn operands_len(&self) -> usize
How many operands does this instruction pop from the stack?
sourcepub fn results_len(&self) -> usize
pub fn results_len(&self) -> usize
How many results does this instruction push onto the stack?
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for WitxInstruction<'a>
impl<'a> Send for WitxInstruction<'a>
impl<'a> Sync for WitxInstruction<'a>
impl<'a> Unpin for WitxInstruction<'a>
impl<'a> UnwindSafe for WitxInstruction<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more