pub struct PointsToSet { /* private fields */ }Expand description
Bounded points-to set: a small sorted vector of LocIds.
“Bounded” means the set silently collapses to {Top} on overflow;
downstream consumers treat Top-containing sets as
over-approximations exactly the same way AbsLoc::Top is treated
at the singleton level.
Implementations§
Source§impl PointsToSet
impl PointsToSet
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Empty set, the value points to nothing tracked by the analysis (e.g. a scalar constant).
Sourcepub fn is_top(&self) -> bool
pub fn is_top(&self) -> bool
True when the set contains LOC_TOP (i.e. has saturated to
the over-approximation).
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn contains(&self, id: LocId) -> bool
pub fn contains(&self, id: LocId) -> bool
Whether id is one of the set members (or the set is Top).
Sourcepub fn insert(&mut self, id: LocId)
pub fn insert(&mut self, id: LocId)
Insert id, maintaining sort/dedup. Saturates to {Top}
when the set would exceed MAX_POINTSTO_MEMBERS.
Sourcepub fn union_in_place(&mut self, other: &PointsToSet) -> bool
pub fn union_in_place(&mut self, other: &PointsToSet) -> bool
Set-union, in place. Returns true when self changed ,
the constraint solver uses the bit to decide whether the
containing equivalence class needs another pass.
Trait Implementations§
Source§impl Clone for PointsToSet
impl Clone for PointsToSet
Source§fn clone(&self) -> PointsToSet
fn clone(&self) -> PointsToSet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PointsToSet
impl Debug for PointsToSet
Source§impl Default for PointsToSet
impl Default for PointsToSet
Source§impl PartialEq for PointsToSet
impl PartialEq for PointsToSet
impl Eq for PointsToSet
impl StructuralPartialEq for PointsToSet
Auto Trait Implementations§
impl Freeze for PointsToSet
impl RefUnwindSafe for PointsToSet
impl Send for PointsToSet
impl Sync for PointsToSet
impl Unpin for PointsToSet
impl UnsafeUnpin for PointsToSet
impl UnwindSafe for PointsToSet
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> 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
Compare self to
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>
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