Enum docs::bytecode_vm::bytecode::instruction::Instruction
source · pub enum Instruction {
Show 37 variants
PUSH,
POP,
CONST {
idx: usize,
},
DEFGLB {
idx: usize,
},
GETGLB {
idx: usize,
},
DEFLCL {
idx: usize,
},
GETLCL {
idx: usize,
},
GETFREE {
idx: usize,
},
ADD,
SUB,
PRODUCT,
DIVIDE,
MOD,
BANG,
NEG,
CGT,
CGTE,
CLT,
CLTE,
CEQ,
CNEQ,
AND,
OR,
BAND,
BOR,
JMP {
idx: usize,
},
JIS {
idx: usize,
},
JNS {
idx: usize,
},
JEQ {
idx: usize,
},
JNEQ {
idx: usize,
},
ARRAY {
count: usize,
},
INDEX,
CALL {
arg_len: usize,
},
RETN,
RETV,
CLOSURE {
idx: usize,
free: usize,
},
GETCUR,
}Variants§
PUSH
POP
CONST
DEFGLB
GETGLB
DEFLCL
GETLCL
GETFREE
ADD
SUB
PRODUCT
DIVIDE
MOD
BANG
NEG
CGT
CGTE
CLT
CLTE
CEQ
CNEQ
AND
OR
BAND
BOR
JMP
JIS
JNS
JEQ
JNEQ
ARRAY
INDEX
CALL
RETN
Return
RETV
Return with value
CLOSURE
Create a closure
GETCUR
Get current function
Implementations§
Trait Implementations§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
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 Instruction
impl Debug for Instruction
source§impl Display for Instruction
impl Display for Instruction
source§impl PartialEq for Instruction
impl PartialEq for Instruction
source§fn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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