pub struct RelevantPlaces {
pub places: FxHashSet<PlaceKey>,
pub locals: FxHashSet<Local>,
pub saturated: FxHashSet<PlaceKey>,
pub just_added: FxHashSet<PlaceKey>,
pub need_len: FxHashSet<PlaceKey>,
}Expand description
Set of places that make MIR items relevant to a property.
Fields§
§places: FxHashSet<PlaceKey>§locals: FxHashSet<Local>§saturated: FxHashSet<PlaceKey>§just_added: FxHashSet<PlaceKey>§need_len: FxHashSet<PlaceKey>Places whose length is needed by a Len(place) contract expression.
Carried through the backward slice to trigger inclusion of slice::len()
calls whose argument traces to the same origin.
Implementations§
Source§impl RelevantPlaces
impl RelevantPlaces
Sourcepub fn insert_local(&mut self, local: Local)
pub fn insert_local(&mut self, local: Local)
Insert a MIR local as a relevance root, tracking the addition.
Sourcepub fn insert_mir_place(&mut self, place: &Place<'_>)
pub fn insert_mir_place(&mut self, place: &Place<'_>)
Insert a MIR place as a relevance root.
Sourcepub fn insert_place_key(&mut self, place: PlaceKey)
pub fn insert_place_key(&mut self, place: PlaceKey)
Insert a prebuilt place key as a relevance root, tracking addition.
Sourcepub fn extend(&mut self, other: RelevantPlaces)
pub fn extend(&mut self, other: RelevantPlaces)
Merge another relevance set into this one, tracking additions.
Sourcepub fn remove_place_keys(&mut self, places: &[PlaceKey])
pub fn remove_place_keys(&mut self, places: &[PlaceKey])
Remove a list of place keys and rebuild the derived local set.
Sourcepub fn intersects(&self, other: &RelevantPlaces) -> bool
pub fn intersects(&self, other: &RelevantPlaces) -> bool
Return true if this set shares any known root with other.
Sourcepub fn remove_all(&mut self, other: &RelevantPlaces)
pub fn remove_all(&mut self, other: &RelevantPlaces)
Remove all roots contained in other from this set, marking them
as saturated (definition found).
fn rebuild_locals(&mut self)
Source§impl RelevantPlaces
impl RelevantPlaces
Sourcepub fn from_property(property: &Property<'_>) -> Self
pub fn from_property(property: &Property<'_>) -> Self
Extract initial relevance roots from a required property.
Sourcepub fn insert_contract_place(&mut self, place: &ContractPlace<'_>)
pub fn insert_contract_place(&mut self, place: &ContractPlace<'_>)
Insert a contract place as a relevance root.
Sourcefn collect_property(&mut self, property: &Property<'_>)
fn collect_property(&mut self, property: &Property<'_>)
Collect all roots mentioned by a property.
Sourcefn collect_target_argument_root(
&mut self,
kind: &PropertyKind,
arg_index: usize,
arg: &PropertyArg<'_>,
) -> bool
fn collect_target_argument_root( &mut self, kind: &PropertyKind, arg_index: usize, arg: &PropertyArg<'_>, ) -> bool
Collect a numeric std-contract target argument as a callee argument root.
Sourcefn collect_property_arg(&mut self, arg: &PropertyArg<'_>)
fn collect_property_arg(&mut self, arg: &PropertyArg<'_>)
Collect all roots mentioned by a property argument.
Sourcefn collect_numeric_predicate(&mut self, predicate: &NumericPredicate<'_>)
fn collect_numeric_predicate(&mut self, predicate: &NumericPredicate<'_>)
Collect all roots mentioned by a numeric predicate.
Sourcefn collect_contract_expr(&mut self, expr: &ContractExpr<'_>)
fn collect_contract_expr(&mut self, expr: &ContractExpr<'_>)
Collect all roots mentioned by a contract expression.
Trait Implementations§
Source§impl Clone for RelevantPlaces
impl Clone for RelevantPlaces
Source§fn clone(&self) -> RelevantPlaces
fn clone(&self) -> RelevantPlaces
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelevantPlaces
impl Debug for RelevantPlaces
Source§impl Default for RelevantPlaces
impl Default for RelevantPlaces
Source§fn default() -> RelevantPlaces
fn default() -> RelevantPlaces
Auto Trait Implementations§
impl DynSend for RelevantPlaces
impl DynSync for RelevantPlaces
impl Freeze for RelevantPlaces
impl RefUnwindSafe for RelevantPlaces
impl Send for RelevantPlaces
impl Sync for RelevantPlaces
impl Unpin for RelevantPlaces
impl UnsafeUnpin for RelevantPlaces
impl UnwindSafe for RelevantPlaces
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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