pub enum Opcode {
Show 49 variants
LOAD,
ADD,
SUB,
MUL,
DIV,
HLT,
JMP,
JMPF,
JMPB,
EQ,
NEQ,
GTE,
LTE,
LT,
GT,
JMPE,
NOP,
ALOC,
INC,
DEC,
DJMPE,
IGL,
PRTS,
LOADF64,
ADDF64,
SUBF64,
MULF64,
DIVF64,
EQF64,
NEQF64,
GTF64,
GTEF64,
LTF64,
LTEF64,
SHL,
SHR,
AND,
OR,
XOR,
NOT,
LUI,
CLOOP,
LOOP,
LOADM,
SETM,
PUSH,
POP,
CALL,
RET,
}
Expand description
Represents an opcode, which tells our interpreter what to do with the following operands
Variants§
LOAD
ADD
SUB
MUL
DIV
HLT
JMP
JMPF
JMPB
EQ
NEQ
GTE
LTE
LT
GT
JMPE
NOP
ALOC
INC
DEC
DJMPE
IGL
PRTS
LOADF64
ADDF64
SUBF64
MULF64
DIVF64
EQF64
NEQF64
GTF64
GTEF64
LTF64
LTEF64
SHL
SHR
AND
OR
XOR
NOT
LUI
CLOOP
LOOP
LOADM
SETM
PUSH
POP
CALL
RET
Trait Implementations§
Source§impl<'a> From<CompleteStr<'a>> for Opcode
Convenience function to convert nom CompleteStr into an opcode
impl<'a> From<CompleteStr<'a>> for Opcode
Convenience function to convert nom CompleteStr into an opcode
Source§fn from(v: CompleteStr<'a>) -> Self
fn from(v: CompleteStr<'a>) -> Self
Converts to this type from the input type.
Source§impl From<u8> for Opcode
We implement this trait to make it easy to convert from a u8 to an Opcode
impl From<u8> for Opcode
We implement this trait to make it easy to convert from a u8 to an Opcode
impl Copy for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnwindSafe for Opcode
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