pub enum Instruction {
Show 58 variants
Push(Value),
Pop,
Dup,
Swap,
Rot3,
Add,
Sub,
Mul,
Div,
Mod,
Neg,
Pow,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
And,
Or,
Not,
Jump(usize),
JumpIf(usize),
JumpIfNot(usize),
Call(usize),
CallNative(String),
Return,
BindLocal(String),
LoadLocal(String),
LoadGlobal(String),
MakeList(usize),
MakeDict(usize),
MakeTuple(usize),
GetIndex,
GetAttr(String),
Slice(Option<i64>, Option<i64>),
ListAppend,
ListConcat,
DictInsert,
DictMerge,
MatchValue,
MatchType(String),
Destructure(usize),
MakePromise,
AwaitPromise,
ResolvePromise,
RejectPromise,
MakeOk,
MakeErr,
UnwrapResult,
MapResult,
RequireCapability(String),
CheckCapability(String),
CallIntrinsic {
name: String,
capability: Option<String>,
},
TraceValue(String),
RecordTelemetry(String),
Nop,
Halt,
}Expand description
Bytecode instructions for the Glyph VM
Variants§
Push(Value)
Pop
Dup
Swap
Rot3
Add
Sub
Mul
Div
Mod
Neg
Pow
Eq
Ne
Lt
Le
Gt
Ge
And
Or
Not
Jump(usize)
JumpIf(usize)
JumpIfNot(usize)
Call(usize)
CallNative(String)
Return
BindLocal(String)
LoadLocal(String)
LoadGlobal(String)
MakeList(usize)
MakeDict(usize)
MakeTuple(usize)
GetIndex
GetAttr(String)
Slice(Option<i64>, Option<i64>)
ListAppend
ListConcat
DictInsert
DictMerge
MatchValue
MatchType(String)
Destructure(usize)
MakePromise
AwaitPromise
ResolvePromise
RejectPromise
MakeOk
MakeErr
UnwrapResult
MapResult
RequireCapability(String)
CheckCapability(String)
CallIntrinsic
TraceValue(String)
RecordTelemetry(String)
Nop
Halt
Implementations§
Source§impl Instruction
impl Instruction
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate 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 Instruction
impl Debug for Instruction
Source§impl<'de> Deserialize<'de> for Instruction
impl<'de> Deserialize<'de> for Instruction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
Source§impl Serialize for Instruction
impl Serialize for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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