pub enum Spot {
Always(Held),
Over(Vec<Span>),
}Expand description
Where a local is over the addresses of the function it is in.
Which of the two a local gets is decided by what lowering did with it rather than by the
optimization level. A local with a frame slot is in that slot from the first instruction of the
function to the last, because the frame layout hands the slot out once and nothing moves it
afterwards, and one expression says so. A scalar whose address is never taken is put in an SSA
value instead, at every optimization level including -O0, and where the register allocator put
that value changes from one program counter to the next.
Variants§
Always(Held)
In one place at every address in the function.
Over(Vec<Span>)
In a place that depends on where the program counter is, said stretch by stretch.
The stretches do not have to cover the function, and an address none of them covers is an address the local is nowhere. That is the honest answer rather than a gap: a value that has not been computed yet, or whose last reader is already behind, is somewhere for part of a function and nowhere for the rest, and a debugger stopped in the rest should say the variable is not available rather than print whatever is in the register now.
Trait Implementations§
impl Eq for Spot
impl StructuralPartialEq for Spot
Auto Trait Implementations§
impl Freeze for Spot
impl RefUnwindSafe for Spot
impl Send for Spot
impl Sync for Spot
impl Unpin for Spot
impl UnsafeUnpin for Spot
impl UnwindSafe for Spot
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.