pub struct LocInterner { /* private fields */ }Expand description
Implementations§
Source§impl LocInterner
impl LocInterner
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Total number of interned locations (including the reserved
LOC_TOP slot).
Sourcepub fn depth(&self, id: LocId) -> u8
pub fn depth(&self, id: LocId) -> u8
Depth of an interned location. 0 for non-Field locations;
1 + depth(parent) for Field { parent, .. }.
Sourcepub fn intern_alloc(&mut self, body: BodyId, ssa_value: u32) -> LocId
pub fn intern_alloc(&mut self, body: BodyId, ssa_value: u32) -> LocId
Intern an Alloc location.
Sourcepub fn intern_param(&mut self, body: BodyId, index: usize) -> LocId
pub fn intern_param(&mut self, body: BodyId, index: usize) -> LocId
Intern a positional Param location.
Sourcepub fn intern_self_param(&mut self, body: BodyId) -> LocId
pub fn intern_self_param(&mut self, body: BodyId) -> LocId
Intern a SelfParam location for the given body.
Sourcepub fn intern_field(&mut self, parent: LocId, field: FieldId) -> LocId
pub fn intern_field(&mut self, parent: LocId, field: FieldId) -> LocId
Intern a Field { parent, field } location. Returns
LOC_TOP when parent is Top or when the resulting depth
would exceed MAX_FIELD_DEPTH.
Trait Implementations§
Source§impl Clone for LocInterner
impl Clone for LocInterner
Source§fn clone(&self) -> LocInterner
fn clone(&self) -> LocInterner
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 LocInterner
impl Debug for LocInterner
Auto Trait Implementations§
impl Freeze for LocInterner
impl RefUnwindSafe for LocInterner
impl Send for LocInterner
impl Sync for LocInterner
impl Unpin for LocInterner
impl UnsafeUnpin for LocInterner
impl UnwindSafe for LocInterner
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<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