rustc_mir_dataflow::framework::visitor

Trait ResultsVisitor

Source
pub trait ResultsVisitor<'mir, 'tcx, R> {
    type Domain;

    // Provided methods
    fn visit_block_start(&mut self, _state: &Self::Domain) { ... }
    fn visit_statement_before_primary_effect(
        &mut self,
        _results: &mut R,
        _state: &Self::Domain,
        _statement: &'mir Statement<'tcx>,
        _location: Location,
    ) { ... }
    fn visit_statement_after_primary_effect(
        &mut self,
        _results: &mut R,
        _state: &Self::Domain,
        _statement: &'mir Statement<'tcx>,
        _location: Location,
    ) { ... }
    fn visit_terminator_before_primary_effect(
        &mut self,
        _results: &mut R,
        _state: &Self::Domain,
        _terminator: &'mir Terminator<'tcx>,
        _location: Location,
    ) { ... }
    fn visit_terminator_after_primary_effect(
        &mut self,
        _results: &mut R,
        _state: &Self::Domain,
        _terminator: &'mir Terminator<'tcx>,
        _location: Location,
    ) { ... }
    fn visit_block_end(&mut self, _state: &Self::Domain) { ... }
}
Expand description

A visitor over the results of an Analysis. The type parameter R is the results type being visited.

Required Associated Types§

Provided Methods§

Source

fn visit_block_start(&mut self, _state: &Self::Domain)

Source

fn visit_statement_before_primary_effect( &mut self, _results: &mut R, _state: &Self::Domain, _statement: &'mir Statement<'tcx>, _location: Location, )

Called with the before_statement_effect of the given statement applied to state but not its statement_effect.

Source

fn visit_statement_after_primary_effect( &mut self, _results: &mut R, _state: &Self::Domain, _statement: &'mir Statement<'tcx>, _location: Location, )

Called with both the before_statement_effect and the statement_effect of the given statement applied to state.

Source

fn visit_terminator_before_primary_effect( &mut self, _results: &mut R, _state: &Self::Domain, _terminator: &'mir Terminator<'tcx>, _location: Location, )

Called with the before_terminator_effect of the given terminator applied to state but not its terminator_effect.

Source

fn visit_terminator_after_primary_effect( &mut self, _results: &mut R, _state: &Self::Domain, _terminator: &'mir Terminator<'tcx>, _location: Location, )

Called with both the before_terminator_effect and the terminator_effect of the given terminator applied to state.

The call_return_effect (if one exists) will not be applied to state.

Source

fn visit_block_end(&mut self, _state: &Self::Domain)

Implementors§

Source§

impl<'mir, 'tcx, R, N> ResultsVisitor<'mir, 'tcx, R> for Visitor<'_, N>
where N: Idx,

Source§

type Domain = BitSet<N>

Source§

impl<'tcx, A> ResultsVisitor<'_, 'tcx, Results<'tcx, A>> for StateDiffCollector<A::Domain>
where A: Analysis<'tcx>, A::Domain: DebugWithContext<A>,

Source§

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