pub struct StackSlotData {
pub kind: StackSlotKind,
pub size: StackSize,
pub align_shift: u8,
pub key: Option<StackSlotKey>,
}
Expand description
Contents of a stack slot.
Fields§
§kind: StackSlotKind
The kind of stack slot.
size: StackSize
Size of stack slot in bytes.
align_shift: u8
Alignment of stack slot as a power-of-two exponent (log2 value). The stack slot will be at least this aligned; it may be aligned according to other considerations, such as minimum stack slot size or machine word size, as well.
key: Option<StackSlotKey>
Opaque stackslot metadata handle, passed through to compilation result metadata describing stackslot location.
In the face of compiler transforms like inlining that may move
stackslots between functions, when an embedder wants to
externally observe stackslots, it needs a first-class way for
the identity of stackslots to be carried along with the IR
entities. This opaque StackSlotKey
allows the embedder to do
so.
Implementations§
Source§impl StackSlotData
impl StackSlotData
Sourcepub fn new(kind: StackSlotKind, size: StackSize, align_shift: u8) -> Self
pub fn new(kind: StackSlotKind, size: StackSize, align_shift: u8) -> Self
Create a stack slot with the specified byte size and alignment.
Sourcepub fn new_with_key(
kind: StackSlotKind,
size: StackSize,
align_shift: u8,
key: StackSlotKey,
) -> Self
pub fn new_with_key( kind: StackSlotKind, size: StackSize, align_shift: u8, key: StackSlotKey, ) -> Self
Create a stack slot with the specified byte size and alignment and the given user-defined key.
Trait Implementations§
Source§impl Clone for StackSlotData
impl Clone for StackSlotData
Source§fn clone(&self) -> StackSlotData
fn clone(&self) -> StackSlotData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StackSlotData
impl Debug for StackSlotData
Source§impl<'de> Deserialize<'de> for StackSlotData
impl<'de> Deserialize<'de> for StackSlotData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for StackSlotData
impl Display for StackSlotData
Source§impl Hash for StackSlotData
impl Hash for StackSlotData
Source§impl PartialEq for StackSlotData
impl PartialEq for StackSlotData
Source§impl Serialize for StackSlotData
impl Serialize for StackSlotData
impl Eq for StackSlotData
impl StructuralPartialEq for StackSlotData
Auto Trait Implementations§
impl Freeze for StackSlotData
impl RefUnwindSafe for StackSlotData
impl Send for StackSlotData
impl Sync for StackSlotData
impl Unpin for StackSlotData
impl UnwindSafe for StackSlotData
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.