pub struct EvmBasicBlock {
pub label: String,
pub instructions: Vec<EvmInstruction>,
pub is_jump_target: bool,
}Expand description
A basic block of EVM instructions with a named label.
Each block starts with a JUMPDEST if it is a jump target.
Fields§
§label: StringSymbolic label for this block (used in assembly output).
instructions: Vec<EvmInstruction>The instructions in this block.
is_jump_target: boolWhether this block needs a JUMPDEST at the start.
Implementations§
Source§impl EvmBasicBlock
impl EvmBasicBlock
Sourcepub fn new_jump_target(label: impl Into<String>) -> Self
pub fn new_jump_target(label: impl Into<String>) -> Self
Create a new basic block that is a jump target (has JUMPDEST).
Sourcepub fn push_instr(&mut self, instr: EvmInstruction)
pub fn push_instr(&mut self, instr: EvmInstruction)
Append an instruction to this block.
Sourcepub fn push_op(&mut self, opcode: EvmOpcode)
pub fn push_op(&mut self, opcode: EvmOpcode)
Append a simple opcode (no immediate data) to this block.
Trait Implementations§
Source§impl Clone for EvmBasicBlock
impl Clone for EvmBasicBlock
Source§fn clone(&self) -> EvmBasicBlock
fn clone(&self) -> EvmBasicBlock
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 moreAuto Trait Implementations§
impl Freeze for EvmBasicBlock
impl RefUnwindSafe for EvmBasicBlock
impl Send for EvmBasicBlock
impl Sync for EvmBasicBlock
impl Unpin for EvmBasicBlock
impl UnsafeUnpin for EvmBasicBlock
impl UnwindSafe for EvmBasicBlock
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