[−][src]Enum passerine::common::opcode::Opcode
This enum represents a single opcode. Under the hood, it's just a byte. This allows non opcode bytes to be inserted in bytecode streams. | Opcode | operands, top first | byte-streams | Does | | ------ | ------------------- | ------------ | ---------------------------------------------- | | Con | | Const Index | Pushes value from constant table onto stack | | Save | Data | | Stores Data in Symbol | | Load | | Local Index | Replaces symbol on top of stack with its value | | Clear | | | Clears stack to last frame/local | | Call | Fun, Data | | Calls the function passing Data as arg | | Return | Data | | Clears the frame, leaving value on the stack |
Variants
Implementations
impl Opcode
[src]
pub fn from_byte(byte: u8) -> Opcode
[src]
Convert a raw byte to an opcode. Note that non-opcode bytes should never be interpreted as an opcode. Under the hood, this is just a transmute, so the regular cautions apply. This should never cause a crash and if it does, the vm's designed to crash hard so it'll be pretty obvious.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnwindSafe for Opcode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,