pub struct ControlFlowGraph<'a> { /* private fields */ }Expand description
A control flow graph that provides query methods for flow analysis.
This wraps the FlowNodeArena and provides convenient methods for querying
flow information during type checking.
Implementations§
Source§impl<'a> FlowGraph<'a>
impl<'a> FlowGraph<'a>
Sourcepub const fn new(arena: &'a FlowNodeArena) -> Self
pub const fn new(arena: &'a FlowNodeArena) -> Self
Create a new FlowGraph from a FlowNodeArena.
Sourcepub fn get(&self, id: FlowNodeId) -> Option<&FlowNode>
pub fn get(&self, id: FlowNodeId) -> Option<&FlowNode>
Get a flow node by ID.
Sourcepub fn antecedents(&self, id: FlowNodeId) -> Vec<FlowNodeId>
pub fn antecedents(&self, id: FlowNodeId) -> Vec<FlowNodeId>
Get the antecedents (predecessors) of a flow node.
Sourcepub fn node(&self, id: FlowNodeId) -> NodeIndex
pub fn node(&self, id: FlowNodeId) -> NodeIndex
Get the AST node associated with a flow node.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FlowGraph<'a>
impl<'a> RefUnwindSafe for FlowGraph<'a>
impl<'a> Send for FlowGraph<'a>
impl<'a> Sync for FlowGraph<'a>
impl<'a> Unpin for FlowGraph<'a>
impl<'a> UnsafeUnpin for FlowGraph<'a>
impl<'a> UnwindSafe for FlowGraph<'a>
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