[][src]Trait solana_libra_bytecode_verifier::control_flow_graph::ControlFlowGraph

pub trait ControlFlowGraph {
    fn block_start(&self, block_id: &BlockId) -> CodeOffset;
fn block_end(&self, block_id: &BlockId) -> CodeOffset;
fn successors(&self, block_id: &BlockId) -> &Vec<BlockId>;
fn instr_indexes(
        &self,
        block_id: &BlockId
    ) -> Box<dyn Iterator<Item = CodeOffset>>;
fn blocks(&self) -> Vec<BlockId>;
fn num_blocks(&self) -> u16;
fn entry_block_id(&self) -> BlockId; }

A trait that specifies the basic requirements for a CFG

Required methods

fn block_start(&self, block_id: &BlockId) -> CodeOffset

Start index of the block ID in the bytecode vector

fn block_end(&self, block_id: &BlockId) -> CodeOffset

End index of the block ID in the bytecode vector

fn successors(&self, block_id: &BlockId) -> &Vec<BlockId>

Successors of the block ID in the bytecode vector

fn instr_indexes(
    &self,
    block_id: &BlockId
) -> Box<dyn Iterator<Item = CodeOffset>>

Iterator over the indexes of instructions in this block

fn blocks(&self) -> Vec<BlockId>

Return an iterator over the blocks of the CFG

fn num_blocks(&self) -> u16

Return the number of blocks (vertices) in the control flow graph

fn entry_block_id(&self) -> BlockId

Return the id of the entry block for this control-flow graph Note: even a CFG with no instructions has an (empty) entry block.

Loading content...

Implementors

impl ControlFlowGraph for VMControlFlowGraph[src]

Loading content...