Skip to main content

Spot

Enum Spot 

Source
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§

Source§

impl Clone for Spot

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Spot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Spot

Source§

impl PartialEq for Spot

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.