pub enum AbsLoc {
Top,
Alloc(BodyId, u32),
Param(BodyId, usize),
SelfParam(BodyId),
Field {
parent: LocId,
field: FieldId,
},
}Expand description
Abstract heap location in the points-to lattice.
A pointer-targets-this kind of fact. Cyclic field chains (e.g.
a.next.next.…) are bounded by MAX_FIELD_DEPTH; once the cap
is exceeded the chain folds to AbsLoc::Top.
Variants§
Top
“Anywhere”, the over-approximation used when precision is unrecoverable (e.g. a value sourced from outside the analysed body, or a points-to set that exceeded the cap).
Alloc(BodyId, u32)
Allocation site within a body, identified by the SSA value of the defining instruction. SSA guarantees a single definition per value, so the SSA value uniquely names the allocation site.
body disambiguates allocations across bodies in the same
file. The interned u32 is the SsaValue.0 of the call /
constructor instruction.
Param(BodyId, usize)
Function parameter, the abstract identity of the value
supplied by the caller for parameter index. The receiver
(self / this) uses AbsLoc::SelfParam instead.
SelfParam(BodyId)
Implicit method receiver (self / this). Distinct from
Param(_, _) so callers don’t have to encode an “is the
receiver” sentinel index.
Field
Heap field of a parent location: parent.f. parent is
itself a LocId, chains of field accesses produce nested
Field locations. Depth is bounded by MAX_FIELD_DEPTH.
Trait Implementations§
impl Eq for AbsLoc
impl StructuralPartialEq for AbsLoc
Auto Trait Implementations§
impl Freeze for AbsLoc
impl RefUnwindSafe for AbsLoc
impl Send for AbsLoc
impl Sync for AbsLoc
impl Unpin for AbsLoc
impl UnsafeUnpin for AbsLoc
impl UnwindSafe for AbsLoc
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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