rustc_mir_dataflow::framework::visitor

Trait ResultsVisitable

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

    // Required methods
    fn bottom_value(&self, body: &Body<'tcx>) -> Self::Domain;
    fn reset_to_block_entry(&self, state: &mut Self::Domain, block: BasicBlock);
    fn reconstruct_before_statement_effect(
        &mut self,
        state: &mut Self::Domain,
        statement: &Statement<'tcx>,
        location: Location,
    );
    fn reconstruct_statement_effect(
        &mut self,
        state: &mut Self::Domain,
        statement: &Statement<'tcx>,
        location: Location,
    );
    fn reconstruct_before_terminator_effect(
        &mut self,
        state: &mut Self::Domain,
        terminator: &Terminator<'tcx>,
        location: Location,
    );
    fn reconstruct_terminator_effect(
        &mut self,
        state: &mut Self::Domain,
        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 one or more dataflow analyses simultaneously.

Required Associated Types§

Required Methods§

Source

fn bottom_value(&self, body: &Body<'tcx>) -> Self::Domain

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

The value of the newly created Domain 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::Domain, block: BasicBlock)

Source

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

Source

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

Source

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

Source

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

Implementors§

Source§

impl<'tcx, A> ResultsVisitable<'tcx> for Results<'tcx, A>
where A: Analysis<'tcx>,

Source§

type Domain = <A as Analysis<'tcx>>::Domain

Source§

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