pub struct ForwardVerifier<'tcx> {
tcx: TyCtxt<'tcx>,
}Expand description
Visits relevant MIR items forward and builds an abstract state.
Fields§
§tcx: TyCtxt<'tcx>Implementations§
Source§impl<'tcx> ForwardVerifier<'tcx>
impl<'tcx> ForwardVerifier<'tcx>
Sourcepub fn new(tcx: TyCtxt<'tcx>) -> Self
pub fn new(tcx: TyCtxt<'tcx>) -> Self
Create a forward visitor over the current compiler type context.
Sourcepub fn visit(&self, items: &RelevantMirItems<'tcx>) -> ForwardVisitResult<'tcx>
pub fn visit(&self, items: &RelevantMirItems<'tcx>) -> ForwardVisitResult<'tcx>
Visit relevant MIR items in path order and produce an abstract state.
Sourcefn visit_statement(
&self,
block: BasicBlock,
statement_index: usize,
reason: KeepReason,
statement: &Statement<'tcx>,
body: &Body<'tcx>,
result: &mut ForwardVisitResult<'tcx>,
)
fn visit_statement( &self, block: BasicBlock, statement_index: usize, reason: KeepReason, statement: &Statement<'tcx>, body: &Body<'tcx>, result: &mut ForwardVisitResult<'tcx>, )
Visit one retained MIR statement.
Sourcefn visit_terminator(
&self,
block: BasicBlock,
reason: KeepReason,
terminator: &Terminator<'tcx>,
body: &Body<'tcx>,
result: &mut ForwardVisitResult<'tcx>,
)
fn visit_terminator( &self, block: BasicBlock, reason: KeepReason, terminator: &Terminator<'tcx>, body: &Body<'tcx>, result: &mut ForwardVisitResult<'tcx>, )
Visit one retained MIR terminator.
Sourcefn value_from_rvalue(&self, rvalue: &Rvalue<'tcx>) -> AbstractValue<'tcx>
fn value_from_rvalue(&self, rvalue: &Rvalue<'tcx>) -> AbstractValue<'tcx>
Build an abstract value for a MIR rvalue.
Sourcefn record_rvalue_facts(
&self,
block: BasicBlock,
statement_index: usize,
place: &Place<'tcx>,
rvalue: &Rvalue<'tcx>,
body: &Body<'tcx>,
result: &mut ForwardVisitResult<'tcx>,
)
fn record_rvalue_facts( &self, block: BasicBlock, statement_index: usize, place: &Place<'tcx>, rvalue: &Rvalue<'tcx>, body: &Body<'tcx>, result: &mut ForwardVisitResult<'tcx>, )
Record initial facts directly implied by selected rvalues.
Sourcefn apply_call_effects(
&self,
block: BasicBlock,
summary: &CallEffectSummary,
args: &[Spanned<Operand<'tcx>>],
is_target_checkpoint: bool,
result: &mut ForwardVisitResult<'tcx>,
)
fn apply_call_effects( &self, block: BasicBlock, summary: &CallEffectSummary, args: &[Spanned<Operand<'tcx>>], is_target_checkpoint: bool, result: &mut ForwardVisitResult<'tcx>, )
Apply a summarized call effect to the path-local abstract state.
Sourcefn pointee_ty_name(&self, caller: DefId, place: &PlaceKey) -> Option<String>
fn pointee_ty_name(&self, caller: DefId, place: &PlaceKey) -> Option<String>
Return a compact pointee type name for a raw pointer local.
fn init_write_ty_name( &self, summary: &CallEffectSummary, caller: DefId, place: &PlaceKey, ) -> String
fn allocated_element_summary( &self, caller: DefId, local: Option<Local>, ) -> Option<(String, u64)>
fn referenced_object_for_place( &self, caller: DefId, place: &Place<'tcx>, ) -> Option<PlaceKey>
fn deref_pointer_value_for_place( &self, caller: DefId, place: &Place<'tcx>, ) -> Option<PlaceKey>
fn box_projection_allocation( &self, caller: DefId, source_place: &PlaceKey, cast_ty: Ty<'tcx>, ) -> Option<(String, u64)>
Auto Trait Implementations§
impl<'tcx> Freeze for ForwardVerifier<'tcx>
impl<'tcx> !RefUnwindSafe for ForwardVerifier<'tcx>
impl<'tcx> !Send for ForwardVerifier<'tcx>
impl<'tcx> !Sync for ForwardVerifier<'tcx>
impl<'tcx> Unpin for ForwardVerifier<'tcx>
impl<'tcx> !UnwindSafe for ForwardVerifier<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more