#[repr(C)]pub struct Insn {
pub op: Opcode,
pub a: u8,
pub b: u8,
pub c: u8,
pub imm: u32,
}Expand description
One register instruction. a, b, c are register operands or small
counts; imm is a constant index, an absolute jump target, a key’s bits,
a scope slot or an i32 literal, as the opcode’s Format says.
Fields§
§op: Opcode§a: u8§b: u8§c: u8§imm: u32Implementations§
Source§impl Insn
impl Insn
pub const fn new(op: Opcode, a: u8, b: u8, c: u8, imm: u32) -> Insn
Sourcepub const fn short(self) -> i16
pub const fn short(self) -> i16
The i16 literal of an Format::AShortJump instruction.
Sourcepub const fn key(self) -> PropertyKey
pub const fn key(self) -> PropertyKey
The imm field read as a property key.
Sourcepub const fn site(self) -> Option<u32>
pub const fn site(self) -> Option<u32>
The cache site of an instruction that has one: c for GetField and
SetField, b | c << 8 for the global forms, imm for New. An index
into the unit’s entries of the IcStore.
Sourcepub const fn has_target(self) -> bool
pub const fn has_target(self) -> bool
Whether imm is a jump target.
Trait Implementations§
impl Copy for Insn
impl Eq for Insn
impl StructuralPartialEq for Insn
Auto Trait Implementations§
impl Freeze for Insn
impl RefUnwindSafe for Insn
impl Send for Insn
impl Sync for Insn
impl Unpin for Insn
impl UnsafeUnpin for Insn
impl UnwindSafe for Insn
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