pub enum Operation {
Show 30 variants
Sequence {
code: Vec<Operation>,
},
Repeats {
code: Vec<Operation>,
repeats: usize,
},
CallFunction {
name: WasmSymbol,
input: Vec<Operation>,
},
GetVariable {
kind: VariableKind,
variable: WasmSymbol,
},
SetVariable {
kind: VariableKind,
variable: WasmSymbol,
},
TeeVariable {
variable: WasmSymbol,
},
StoreVariable {
type: WasmType,
offset: u64,
},
GetField {
structure: WasmSymbol,
field: WasmSymbol,
},
GetIndex {
type: ArrayType,
index: i32,
object: Vec<Operation>,
},
ArrayCreate {
type: ArrayType,
element: Vec<Operation>,
},
ArrayLength {
object: Vec<Operation>,
},
ArrayGrow {
type: ArrayType,
capacity: u32,
},
ArrayFill {
array: Vec<Operation>,
type: ArrayType,
element: Vec<Operation>,
start: u64,
length: u64,
},
SetField {
structure: WasmSymbol,
field: WasmSymbol,
},
Loop {
continue: WasmSymbol,
break: WasmSymbol,
body: Vec<Operation>,
},
Goto {
label: WasmSymbol,
},
Drop,
Return,
Unreachable,
JumpBranch(JumpBranch),
JumpTable(JumpTable),
JumpEnumeration(EnumerationTable),
Default {
typed: WasmType,
},
Construct {
structure: WasmSymbol,
},
Constant {
value: WasmValue,
},
NativeSum {
type: WasmType,
terms: Vec<Operation>,
},
Convert {
from: WasmType,
into: WasmType,
code: Vec<Operation>,
},
Transmute {
from: WasmType,
into: WasmType,
code: Vec<Operation>,
},
NativeEqual {
type: WasmType,
codes: Vec<Operation>,
},
NativeEqualZero {
native: WasmType,
term: Box<Operation>,
},
}Variants§
Sequence
Repeats
CallFunction
GetVariable
SetVariable
TeeVariable
Fields
§
variable: WasmSymbolStoreVariable
GetField
GetIndex
ArrayCreate
ArrayLength
ArrayGrow
ArrayFill
SetField
Loop
Goto
Fields
§
label: WasmSymbolDrop
Return
Unreachable
JumpBranch(JumpBranch)
if cond { } else { }
JumpTable(JumpTable)
if c1 { } else if c2 { } else { }
JumpEnumeration(EnumerationTable)
case 0: ... else: ...
Default
Construct
Fields
§
structure: WasmSymbolConstant
NativeSum
Convert
Transmute
NativeEqual
NativeEqualZero
Implementations§
source§impl Operation
impl Operation
pub fn loop(label: &str, body: Vec<Operation>) -> Self
pub fn continue(label: &str) -> Self
pub fn break(label: &str) -> Self
pub fn global_get<S: Into<WasmSymbol>>(name: S) -> Self
pub fn global_set<S: Into<WasmSymbol>>(name: S) -> Self
pub fn local_get<S: Into<WasmSymbol>>(name: S) -> Self
pub fn local_set<S: Into<WasmSymbol>>(name: S) -> Self
pub fn local_tee<S: Into<WasmSymbol>>(name: S) -> Self
pub fn drop(count: usize) -> Self
Trait Implementations§
source§impl From<JumpBranch> for Operation
impl From<JumpBranch> for Operation
source§fn from(value: JumpBranch) -> Self
fn from(value: JumpBranch) -> Self
Converts to this type from the input type.
source§impl WasmInstruction for Operation
impl WasmInstruction for Operation
fn emit<'a, 'i>(&'a self, w: &mut Vec<Instruction<'i>>)where
'a: 'i,
Auto Trait Implementations§
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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