pub trait ValueAnalysis<'tcx> {
type Value: Clone + JoinSemiLattice + HasBottom + HasTop + Debug;
const NAME: &'static str;
Show 22 methods
// Required method
fn map(&self) -> &Map<'tcx>;
// Provided methods
fn handle_statement(
&self,
statement: &Statement<'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn super_statement(
&self,
statement: &Statement<'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn handle_set_discriminant(
&self,
place: Place<'tcx>,
variant_index: VariantIdx,
state: &mut State<Self::Value>,
) { ... }
fn super_set_discriminant(
&self,
place: Place<'tcx>,
_variant_index: VariantIdx,
state: &mut State<Self::Value>,
) { ... }
fn handle_intrinsic(
&self,
intrinsic: &NonDivergingIntrinsic<'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn super_intrinsic(
&self,
intrinsic: &NonDivergingIntrinsic<'tcx>,
_state: &mut State<Self::Value>,
) { ... }
fn handle_assign(
&self,
target: Place<'tcx>,
rvalue: &Rvalue<'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn super_assign(
&self,
target: Place<'tcx>,
rvalue: &Rvalue<'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn handle_rvalue(
&self,
rvalue: &Rvalue<'tcx>,
state: &mut State<Self::Value>,
) -> ValueOrPlace<Self::Value> { ... }
fn super_rvalue(
&self,
rvalue: &Rvalue<'tcx>,
state: &mut State<Self::Value>,
) -> ValueOrPlace<Self::Value> { ... }
fn handle_operand(
&self,
operand: &Operand<'tcx>,
state: &mut State<Self::Value>,
) -> ValueOrPlace<Self::Value> { ... }
fn super_operand(
&self,
operand: &Operand<'tcx>,
state: &mut State<Self::Value>,
) -> ValueOrPlace<Self::Value> { ... }
fn handle_constant(
&self,
constant: &ConstOperand<'tcx>,
state: &mut State<Self::Value>,
) -> Self::Value { ... }
fn super_constant(
&self,
_constant: &ConstOperand<'tcx>,
_state: &mut State<Self::Value>,
) -> Self::Value { ... }
fn handle_terminator<'mir>(
&self,
terminator: &'mir Terminator<'tcx>,
state: &mut State<Self::Value>,
) -> TerminatorEdges<'mir, 'tcx> { ... }
fn super_terminator<'mir>(
&self,
terminator: &'mir Terminator<'tcx>,
state: &mut State<Self::Value>,
) -> TerminatorEdges<'mir, 'tcx> { ... }
fn handle_call_return(
&self,
return_places: CallReturnPlaces<'_, 'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn super_call_return(
&self,
return_places: CallReturnPlaces<'_, 'tcx>,
state: &mut State<Self::Value>,
) { ... }
fn handle_switch_int<'mir>(
&self,
discr: &'mir Operand<'tcx>,
targets: &'mir SwitchTargets,
state: &mut State<Self::Value>,
) -> TerminatorEdges<'mir, 'tcx> { ... }
fn super_switch_int<'mir>(
&self,
discr: &'mir Operand<'tcx>,
targets: &'mir SwitchTargets,
_state: &mut State<Self::Value>,
) -> TerminatorEdges<'mir, 'tcx> { ... }
fn wrap(self) -> ValueAnalysisWrapper<Self>
where Self: Sized { ... }
}
Required Associated Constants§
Required Associated Types§
Required Methods§
Provided Methods§
fn handle_statement( &self, statement: &Statement<'tcx>, state: &mut State<Self::Value>, )
fn super_statement( &self, statement: &Statement<'tcx>, state: &mut State<Self::Value>, )
fn handle_set_discriminant( &self, place: Place<'tcx>, variant_index: VariantIdx, state: &mut State<Self::Value>, )
fn super_set_discriminant( &self, place: Place<'tcx>, _variant_index: VariantIdx, state: &mut State<Self::Value>, )
fn handle_intrinsic( &self, intrinsic: &NonDivergingIntrinsic<'tcx>, state: &mut State<Self::Value>, )
fn super_intrinsic( &self, intrinsic: &NonDivergingIntrinsic<'tcx>, _state: &mut State<Self::Value>, )
fn handle_assign( &self, target: Place<'tcx>, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, )
fn super_assign( &self, target: Place<'tcx>, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, )
fn handle_rvalue( &self, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>
fn super_rvalue( &self, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>
fn handle_operand( &self, operand: &Operand<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>
fn super_operand( &self, operand: &Operand<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>
fn handle_constant( &self, constant: &ConstOperand<'tcx>, state: &mut State<Self::Value>, ) -> Self::Value
fn super_constant( &self, _constant: &ConstOperand<'tcx>, _state: &mut State<Self::Value>, ) -> Self::Value
sourcefn handle_terminator<'mir>(
&self,
terminator: &'mir Terminator<'tcx>,
state: &mut State<Self::Value>,
) -> TerminatorEdges<'mir, 'tcx>
fn handle_terminator<'mir>( &self, terminator: &'mir Terminator<'tcx>, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>
The effect of a successful function call return should not be
applied here, see Analysis::apply_terminator_effect
.
fn super_terminator<'mir>( &self, terminator: &'mir Terminator<'tcx>, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>
fn handle_call_return( &self, return_places: CallReturnPlaces<'_, 'tcx>, state: &mut State<Self::Value>, )
fn super_call_return( &self, return_places: CallReturnPlaces<'_, 'tcx>, state: &mut State<Self::Value>, )
fn handle_switch_int<'mir>( &self, discr: &'mir Operand<'tcx>, targets: &'mir SwitchTargets, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>
fn super_switch_int<'mir>( &self, discr: &'mir Operand<'tcx>, targets: &'mir SwitchTargets, _state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>
fn wrap(self) -> ValueAnalysisWrapper<Self>where
Self: Sized,
Object Safety§
This trait is not object safe.