Struct rustc_mir::borrow_check::region_infer::values::LivenessValues [−][src]
pub(crate) struct LivenessValues<N: Idx> { elements: Rc<RegionValueElements>, points: SparseBitMatrix<N, PointIndex>, }
Expand description
When we initially compute liveness, we use a bit matrix storing points for each region-vid.
Fields
elements: Rc<RegionValueElements>points: SparseBitMatrix<N, PointIndex>Implementations
impl<N: Idx> LivenessValues<N>[src]
impl<N: Idx> LivenessValues<N>[src]pub(crate) fn new(elements: Rc<RegionValueElements>) -> Self[src]
pub(crate) fn new(elements: Rc<RegionValueElements>) -> Self[src]Creates a new set of “region values” that tracks causal information. Each of the regions in num_region_variables will be initialized with an empty set of points and no causal information.
pub(crate) fn rows(&self) -> impl Iterator<Item = N>[src]
pub(crate) fn rows(&self) -> impl Iterator<Item = N>[src]Iterate through each region that has a value in this set.
pub(crate) fn add_element(&mut self, row: N, location: Location) -> bool[src]
pub(crate) fn add_element(&mut self, row: N, location: Location) -> bool[src]Adds the given element to the value for the given region. Returns whether the element is newly added (i.e., was not already present).
pub(crate) fn add_elements(
&mut self,
row: N,
locations: &HybridBitSet<PointIndex>
) -> bool[src]
pub(crate) fn add_elements(
&mut self,
row: N,
locations: &HybridBitSet<PointIndex>
) -> bool[src]Adds all the elements in the given bit array into the given region. Returns whether any of them are newly added.
pub(crate) fn add_all_points(&mut self, row: N)[src]
pub(crate) fn add_all_points(&mut self, row: N)[src]Adds all the control-flow points to the values for r.
pub(crate) fn contains(&self, row: N, location: Location) -> bool[src]
pub(crate) fn contains(&self, row: N, location: Location) -> bool[src]Returns true if the region r contains the given element.
pub(crate) fn region_value_str(&self, r: N) -> String[src]
pub(crate) fn region_value_str(&self, r: N) -> String[src]Returns a “pretty” string value of the region. Meant for debugging.
Auto Trait Implementations
impl<N> !RefUnwindSafe for LivenessValues<N>
impl<N> !Send for LivenessValues<N>
impl<N> !Sync for LivenessValues<N>
impl<N> Unpin for LivenessValues<N>
impl<N> UnwindSafe for LivenessValues<N>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]