pub struct VMControlFlowGraph { /* private fields */ }Expand description
The control flow graph that we build from the bytecode.
Implementations
Trait Implementations
sourceimpl ControlFlowGraph for VMControlFlowGraph
 
impl ControlFlowGraph for VMControlFlowGraph
sourcefn 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
sourcefn 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
sourcefn successors(&self, block_id: BlockId) -> &Vec<BlockId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator, 
 
fn successors(&self, block_id: BlockId) -> &Vec<BlockId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator, 
A: Allocator,
Successors of the block ID in the bytecode vector
sourcefn next_block(&self, block_id: BlockId) -> Option<CodeOffset>
 
fn next_block(&self, block_id: BlockId) -> Option<CodeOffset>
Return the next block in traversal order
sourcefn 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
sourcefn blocks(&self) -> Vec<BlockId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator, 
 
fn blocks(&self) -> Vec<BlockId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator, 
A: Allocator,
Return an iterator over the blocks of the CFG
sourcefn num_blocks(&self) -> u16
 
fn num_blocks(&self) -> u16
Return the number of blocks (vertices) in the control flow graph
sourcefn 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. Read more
sourcefn is_loop_head(&self, block_id: BlockId) -> bool
 
fn is_loop_head(&self, block_id: BlockId) -> bool
Checks if the block ID is a loop head
Auto Trait Implementations
impl RefUnwindSafe for VMControlFlowGraph
impl Send for VMControlFlowGraph
impl Sync for VMControlFlowGraph
impl Unpin for VMControlFlowGraph
impl UnwindSafe for VMControlFlowGraph
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more