pub enum Operand {
None,
Int(i32),
Long(i64),
Str(u32),
JumpTarget(usize),
SwitchTable(u32),
StringCount(u32),
ArrayDef(i32, u8),
}Expand description
The operand (data) associated with an instruction.
Kept as small as possible (each script holds a Vec<Instruction>, and the
corpus runs to ~half a million instructions): the two heap-backed payloads —
string literals and switch tables — live in side pools on the owning
CompiledScript, and the operand stores only a u32 index into them. That
keeps every variant ≤ 8 B, so Operand is 16 B and Instruction is 24 B
(vs 24/32 when the payloads were inline Box<str>/Box<[_]>).
Variants§
None
Int(i32)
Long(i64)
Str(u32)
JumpTarget(usize)
SwitchTable(u32)
StringCount(u32)
ArrayDef(i32, u8)
Trait Implementations§
Auto Trait Implementations§
impl Forget for Operand
impl Freeze for Operand
impl Move for Operand
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnsafeUnpin for Operand
impl UnwindSafe for Operand
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