Enum nyar_wasm::WasiInstruction
source · pub enum WasiInstruction {
Show 15 variants
Default(WasiType),
Constant(WasiValue),
Convert {
into: WasiType,
},
Transmute {
into: WasiType,
},
GetField,
SetField,
CallFunction {
symbol: Identifier,
},
NativeSum {
terms: Vec<WasiInstruction>,
},
NativeProduct {
terms: Vec<WasiInstruction>,
},
JumpBranch(JumpBranch),
JumpTable(JumpTable),
JumpEnumeration(EnumerationTable),
Goto {},
Return {},
Drop {
objects: usize,
},
}
Variants§
Default(WasiType)
Create the default value for a given type
Constant(WasiValue)
Create a constant value
Convert
Convert stack value to WASI type
Transmute
Transmute stack value to WASI type
GetField
SetField
CallFunction
Fields
§
symbol: Identifier
NativeSum
Fields
§
terms: Vec<WasiInstruction>
NativeProduct
Fields
§
terms: Vec<WasiInstruction>
JumpBranch(JumpBranch)
if cond { } else { }
JumpTable(JumpTable)
if c1 { } else if c2 { } else { }
JumpEnumeration(EnumerationTable)
case 0: ... else: ...
Goto
Return
Drop
Implementations§
source§impl WasiInstruction
impl WasiInstruction
pub fn if_then(if: Vec<WasiInstruction>, then: Vec<WasiInstruction>) -> Self
pub fn if_then_else( if: Vec<WasiInstruction>, then: Vec<WasiInstruction>, else: Vec<WasiInstruction> ) -> Self
Trait Implementations§
source§impl Clone for WasiInstruction
impl Clone for WasiInstruction
source§fn clone(&self) -> WasiInstruction
fn clone(&self) -> WasiInstruction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WasiInstruction
impl Debug for WasiInstruction
source§impl From<JumpBranch> for WasiInstruction
impl From<JumpBranch> for WasiInstruction
source§fn from(value: JumpBranch) -> Self
fn from(value: JumpBranch) -> Self
Converts to this type from the input type.
source§impl Hash for WasiInstruction
impl Hash for WasiInstruction
source§impl Ord for WasiInstruction
impl Ord for WasiInstruction
source§fn cmp(&self, other: &WasiInstruction) -> Ordering
fn cmp(&self, other: &WasiInstruction) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for WasiInstruction
impl PartialEq for WasiInstruction
source§fn eq(&self, other: &WasiInstruction) -> bool
fn eq(&self, other: &WasiInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for WasiInstruction
impl PartialOrd for WasiInstruction
source§fn partial_cmp(&self, other: &WasiInstruction) -> Option<Ordering>
fn partial_cmp(&self, other: &WasiInstruction) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for WasiInstruction
impl StructuralPartialEq for WasiInstruction
Auto Trait Implementations§
impl Freeze for WasiInstruction
impl RefUnwindSafe for WasiInstruction
impl Send for WasiInstruction
impl Sync for WasiInstruction
impl Unpin for WasiInstruction
impl UnwindSafe for WasiInstruction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.