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>,