#[repr(u8)]pub enum Op {
Mov(LocalAddress, LocalAddress),
MovI(LocalAddress, Immediate),
Add(LocalAddress, LocalAddress, LocalAddress),
Call(ExtendedImmediate),
Ret,
Nop,
}Expand description
A VM operation.
Variants§
Mov(LocalAddress, LocalAddress)
Self::Mov(a, b) copies the contents at address b to a.
MovI(LocalAddress, Immediate)
Self::MovI(a, i) loads i at address a.
Add(LocalAddress, LocalAddress, LocalAddress)
Self::Add(a, b, c) loads the sum of the contents at addresses b and
c at address a.
Call(ExtendedImmediate)
Self::Call(ix) saves the instruction pointer and jumps to the ixth
code instruction, pushing a new call frame.
Ret
Self::Ret restores the previous call frame and restores the
instruction pointer.
Nop
Self::Nop has no effect.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin 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