pub struct Instruction {
pub opcode: Opcode,
pub operands: Vec<Token>,
pub span: Range<usize>,
}Fields§
§opcode: Opcode§operands: Vec<Token>§span: Range<usize>Implementations§
Source§impl Instruction
impl Instruction
pub fn get_size(&self) -> u64
pub fn needs_relocation(&self) -> bool
pub fn is_jump(&self) -> bool
pub fn get_relocation_info(&self) -> (RelocationType, String)
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl ParseWithConstMap for Instruction
impl ParseWithConstMap for Instruction
fn parse_with_constmap<'a>( tokens: &'a [Token], const_map: &HashMap<String, ImmediateValue>, ) -> Result<(Self, &'a [Token]), CompileError>
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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