rustc_mir_dataflow

Trait Direction

Source
pub trait Direction {
    const IS_FORWARD: bool;
    const IS_BACKWARD: bool = _;

    // Required methods
    fn apply_effects_in_block<'mir, 'tcx, A>(
        analysis: &mut A,
        body: &Body<'tcx>,
        state: &mut A::Domain,
        block: BasicBlock,
        block_data: &'mir BasicBlockData<'tcx>,
        propagate: impl FnMut(BasicBlock, &A::Domain),
    )
       where A: Analysis<'tcx>;
    fn apply_effects_in_range<'tcx, A>(
        analysis: &mut A,
        state: &mut A::Domain,
        block: BasicBlock,
        block_data: &BasicBlockData<'tcx>,
        effects: RangeInclusive<EffectIndex>,
    )
       where A: Analysis<'tcx>;
    fn visit_results_in_block<'mir, 'tcx, A>(
        state: &mut A::Domain,
        block: BasicBlock,
        block_data: &'mir BasicBlockData<'tcx>,
        results: &mut Results<'tcx, A>,
        vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
    )
       where A: Analysis<'tcx>;
}

Required Associated Constants§

Provided Associated Constants§

Required Methods§

Source

fn apply_effects_in_block<'mir, 'tcx, A>( analysis: &mut A, body: &Body<'tcx>, state: &mut A::Domain, block: BasicBlock, block_data: &'mir BasicBlockData<'tcx>, propagate: impl FnMut(BasicBlock, &A::Domain), )
where A: Analysis<'tcx>,

Called by iterate_to_fixpoint during initial analysis computation.

Source

fn apply_effects_in_range<'tcx, A>( analysis: &mut A, state: &mut A::Domain, block: BasicBlock, block_data: &BasicBlockData<'tcx>, effects: RangeInclusive<EffectIndex>, )
where A: Analysis<'tcx>,

Called by ResultsCursor to recompute the domain value for a location in a basic block. Applies all effects between the given EffectIndexs.

effects.start() must precede or equal effects.end() in this direction.

Source

fn visit_results_in_block<'mir, 'tcx, A>( state: &mut A::Domain, block: BasicBlock, block_data: &'mir BasicBlockData<'tcx>, results: &mut Results<'tcx, A>, vis: &mut impl ResultsVisitor<'mir, 'tcx, A>, )
where A: Analysis<'tcx>,

Called by ResultsVisitor to recompute the analysis domain values for all locations in a basic block (starting from the entry value stored in Results) and to visit them with vis.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§