pub enum ReadOperation {
Local(Vec<u8>),
Point(usize),
}
Expand description
When the VM encounters an instruction that requires a value, it will perform a read operation.
Variants§
Local(Vec<u8>)
The bytes are hardcoded in the file, after this point. The size of this operation is declared after the identifier byte.
Point(usize)
The bytes are located at a different memory pointer index. The size of this operation is first declared at the index.
Implementations§
Source§impl ReadOperation
impl ReadOperation
Sourcepub fn get_identifier_byte(&self) -> u8
pub fn get_identifier_byte(&self) -> u8
Get the byte the VM will use to identify this kind of read operation.
Sourcepub fn compile(&self, dest: &mut Vec<u8>, program_options: &ProgramOptions)
pub fn compile(&self, dest: &mut Vec<u8>, program_options: &ProgramOptions)
Compile this read operation to its bytecode representation.
Auto Trait Implementations§
impl Freeze for ReadOperation
impl RefUnwindSafe for ReadOperation
impl Send for ReadOperation
impl Sync for ReadOperation
impl Unpin for ReadOperation
impl UnwindSafe for ReadOperation
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