rustc_mir_dataflow

Trait ResultsVisitor

Source
pub trait ResultsVisitor<'mir, 'tcx, A>
where A: Analysis<'tcx>,
{ // Provided methods fn visit_block_start(&mut self, _state: &A::Domain) { ... } fn visit_after_early_statement_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _statement: &'mir Statement<'tcx>, _location: Location, ) { ... } fn visit_after_primary_statement_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _statement: &'mir Statement<'tcx>, _location: Location, ) { ... } fn visit_after_early_terminator_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _terminator: &'mir Terminator<'tcx>, _location: Location, ) { ... } fn visit_after_primary_terminator_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _terminator: &'mir Terminator<'tcx>, _location: Location, ) { ... } fn visit_block_end(&mut self, _state: &A::Domain) { ... } }
Expand description

A visitor over the results of an Analysis. Use this when you want to inspect domain values in many or all locations; use ResultsCursor if you want to inspect domain values only in certain locations.

Provided Methods§

Source

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

Source

fn visit_after_early_statement_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _statement: &'mir Statement<'tcx>, _location: Location, )

Called after the “early” effect of the given statement is applied to state.

Source

fn visit_after_primary_statement_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _statement: &'mir Statement<'tcx>, _location: Location, )

Called after the “primary” effect of the given statement is applied to state.

Source

fn visit_after_early_terminator_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _terminator: &'mir Terminator<'tcx>, _location: Location, )

Called after the “early” effect of the given terminator is applied to state.

Source

fn visit_after_primary_terminator_effect( &mut self, _results: &mut Results<'tcx, A>, _state: &A::Domain, _terminator: &'mir Terminator<'tcx>, _location: Location, )

Called after the “primary” effect of the given terminator is applied to state.

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

Source

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

Implementors§

Source§

impl<'mir, 'tcx, A, N> ResultsVisitor<'mir, 'tcx, A> for Visitor<'_, N>
where A: Analysis<'tcx, Domain = BitSet<N>>, N: Idx,

Source§

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