pub struct PreDecodedInst {
pub opcode: Opcode,
pub args: Args,
pub pc: u32,
pub next_pc: u32,
pub gas_cost: u32,
pub is_gas_block_start: bool,
pub ra: u8,
pub rb: u8,
pub rd: u8,
}Expand description
Pre-decoded PVM instruction. Stores everything the codegen and the gas simulator need per instruction.
Fields§
§opcode: OpcodePVM opcode (for compile_instruction match dispatch).
args: ArgsDecoded arguments (registers, immediates, offsets).
pc: u32PVM byte offset of this instruction.
next_pc: u32PVM byte offset of the next instruction.
gas_cost: u32Gas cost if this is a gas block start (>0), 0 otherwise. Set by the recompiler’s single-pass codegen via placeholder + patch.
is_gas_block_start: boolWhether this instruction starts a gas metering block.
ra: u8Flat register fields for fast gas cost lookup (avoids Args enum match).
rb: u8§rd: u8Trait Implementations§
Source§impl Clone for PreDecodedInst
impl Clone for PreDecodedInst
Source§fn clone(&self) -> PreDecodedInst
fn clone(&self) -> PreDecodedInst
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 PreDecodedInst
impl Debug for PreDecodedInst
impl Copy for PreDecodedInst
Auto Trait Implementations§
impl Freeze for PreDecodedInst
impl RefUnwindSafe for PreDecodedInst
impl Send for PreDecodedInst
impl Sync for PreDecodedInst
impl Unpin for PreDecodedInst
impl UnsafeUnpin for PreDecodedInst
impl UnwindSafe for PreDecodedInst
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