pub trait ResultsVisitable<'tcx> {
    type Direction: Direction;
    type FlowState;

    // Required methods
    fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowState;
    fn reset_to_block_entry(
        &self,
        state: &mut Self::FlowState,
        block: BasicBlock
    );
    fn reconstruct_before_statement_effect(
        &mut self,
        state: &mut Self::FlowState,
        statement: &Statement<'tcx>,
        location: Location
    );
    fn reconstruct_statement_effect(
        &mut self,
        state: &mut Self::FlowState,
        statement: &Statement<'tcx>,
        location: Location
    );
    fn reconstruct_before_terminator_effect(
        &mut self,
        state: &mut Self::FlowState,
        terminator: &Terminator<'tcx>,
        location: Location
    );
    fn reconstruct_terminator_effect(
        &mut self,
        state: &mut Self::FlowState,
        terminator: &Terminator<'tcx>,
        location: Location
    );
}
Expand description

Things that can be visited by a ResultsVisitor.

This trait exists so that we can visit the results of multiple dataflow analyses simultaneously. DO NOT IMPLEMENT MANUALLY. Instead, use the impl_visitable macro below.

Required Associated Types§

Required Methods§

source

fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowState

Creates an empty FlowState to hold the transient state for these dataflow results.

The value of the newly created FlowState will be overwritten by reset_to_block_entry before it can be observed by a ResultsVisitor.

source

fn reset_to_block_entry(&self, state: &mut Self::FlowState, block: BasicBlock)

source

fn reconstruct_before_statement_effect( &mut self, state: &mut Self::FlowState, statement: &Statement<'tcx>, location: Location )

source

fn reconstruct_statement_effect( &mut self, state: &mut Self::FlowState, statement: &Statement<'tcx>, location: Location )

source

fn reconstruct_before_terminator_effect( &mut self, state: &mut Self::FlowState, terminator: &Terminator<'tcx>, location: Location )

source

fn reconstruct_terminator_effect( &mut self, state: &mut Self::FlowState, terminator: &Terminator<'tcx>, location: Location )

Implementors§

source§

impl<'tcx, A, E> ResultsVisitable<'tcx> for Results<'tcx, A, E>where A: Analysis<'tcx>, E: Borrow<IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>,

§

type FlowState = <A as AnalysisDomain<'tcx>>::Domain

§

type Direction = <A as AnalysisDomain<'tcx>>::Direction