pub enum Op {
}Expand description
Opcodes for a ternary bytecode virtual machine.
Variants§
LoadConst(Trit)
Load a constant trit value.
Load(usize)
Load from register index.
Store(usize)
Store to register index.
Add
Add two trits (clamped).
Mul
Multiply two trits.
Neg
Negate top of stack.
Nop
No operation.
Jump(usize)
Jump to instruction index.
JumpIfZero(usize)
Jump if top of stack is Zero.
JumpIfNeg(usize)
Jump if top of stack is Neg.
JumpIfPos(usize)
Jump if top of stack is Pos.
Input
Push trit from input stream.
Output
Pop trit to output stream.
Halt
Halt execution.
Trait Implementations§
impl Copy for Op
impl Eq for Op
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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