pub trait ValueAnalysis<'tcx> {
type Value: Clone + JoinSemiLattice + HasBottom + HasTop;
const NAME: &'static str;
Show 22 methods
// Required method
fn map(&self) -> ⤅
// 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: &Constant<'tcx>,
state: &mut State<Self::Value>
) -> Self::Value { ... }
fn super_constant(
&self,
_constant: &Constant<'tcx>,
_state: &mut State<Self::Value>
) -> Self::Value { ... }
fn handle_terminator(
&self,
terminator: &Terminator<'tcx>,
state: &mut State<Self::Value>
) { ... }
fn super_terminator(
&self,
terminator: &Terminator<'tcx>,
state: &mut State<Self::Value>
) { ... }
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(
&self,
discr: &Operand<'tcx>,
apply_edge_effects: &mut impl SwitchIntEdgeEffects<State<Self::Value>>
) { ... }
fn super_switch_int(
&self,
_discr: &Operand<'tcx>,
_apply_edge_effects: &mut impl SwitchIntEdgeEffects<State<Self::Value>>
) { ... }
fn wrap(self) -> ValueAnalysisWrapper<Self>
where Self: Sized { ... }
}Required Associated Types§
Required Associated Constants§
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: &Constant<'tcx>, state: &mut State<Self::Value> ) -> Self::Value
fn super_constant( &self, _constant: &Constant<'tcx>, _state: &mut State<Self::Value> ) -> Self::Value
sourcefn handle_terminator(
&self,
terminator: &Terminator<'tcx>,
state: &mut State<Self::Value>
)
fn handle_terminator( &self, terminator: &Terminator<'tcx>, state: &mut State<Self::Value> )
The effect of a successful function call return should not be
applied here, see Analysis::apply_terminator_effect.