pub struct VMControlFlowGraph { /* private fields */ }
Expand description
The control flow graph that we build from the bytecode.
Implementations§
Trait Implementations§
source§impl ControlFlowGraph for VMControlFlowGraph
impl ControlFlowGraph for VMControlFlowGraph
source§fn block_start(&self, block_id: BlockId) -> CodeOffset
fn block_start(&self, block_id: BlockId) -> CodeOffset
Start index of the block ID in the bytecode vector
source§fn block_end(&self, block_id: BlockId) -> CodeOffset
fn block_end(&self, block_id: BlockId) -> CodeOffset
End index of the block ID in the bytecode vector
source§fn successors(&self, block_id: BlockId) -> &Vec<BlockId> ⓘ
fn successors(&self, block_id: BlockId) -> &Vec<BlockId> ⓘ
Successors of the block ID in the bytecode vector
source§fn instr_indexes(
&self,
block_id: BlockId
) -> Box<dyn Iterator<Item = CodeOffset>>
fn instr_indexes( &self, block_id: BlockId ) -> Box<dyn Iterator<Item = CodeOffset>>
Iterator over the indexes of instructions in this block
source§fn num_blocks(&self) -> u16
fn num_blocks(&self) -> u16
Return the number of blocks (vertices) in the control flow graph
source§fn entry_block_id(&self) -> BlockId
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.