Struct cranelift_codegen::ir::stackslot::StackSlots [−][src]
Stack frame manager.
Keep track of all the stack slots used by a function.
Fields
layout_info: Option<StackLayoutInfo>
Layout information computed from layout_stack
.
Implementations
impl StackSlots
[src]
Stack slot manager functions that behave mostly like an entity map.
pub fn new() -> Self
[src]
Create an empty stack slot manager.
pub fn clear(&mut self)
[src]
Clear out everything.
pub fn push(&mut self, data: StackSlotData) -> StackSlot
[src]
Allocate a new stack slot.
This function should be primarily used by the text format parser. There are more convenient functions for creating specific kinds of stack slots below.
pub fn is_valid(&self, ss: StackSlot) -> bool
[src]
Check if ss
is a valid stack slot reference.
pub fn iter(&self) -> Iter<'_, StackSlot, StackSlotData>
[src]
Get an iterator over all the stack slot keys.
pub fn iter_mut(&mut self) -> IterMut<'_, StackSlot, StackSlotData>
[src]
Get an iterator over all the stack slot keys, mutable edition.
pub fn values(&self) -> Iter<'_, StackSlotData>
[src]
Get an iterator over all the stack slot records.
pub fn values_mut(&mut self) -> IterMut<'_, StackSlotData>
[src]
Get an iterator over all the stack slot records, mutable edition.
pub fn keys(&self) -> Keys<StackSlot>
[src]
Get an iterator over all the stack slot keys.
pub fn next_key(&self) -> StackSlot
[src]
Get a reference to the next stack slot that would be created by push()
.
This should just be used by the parser.
impl StackSlots
[src]
Higher-level stack frame manipulation functions.
pub fn make_spill_slot(&mut self, ty: Type) -> StackSlot
[src]
Create a new spill slot for spilling values of type ty
.
pub fn make_incoming_arg(&mut self, size: u32, offset: StackOffset) -> StackSlot
[src]
Create a stack slot representing an incoming function argument.
pub fn get_outgoing_arg(&mut self, size: u32, offset: StackOffset) -> StackSlot
[src]
Get a stack slot representing an outgoing argument.
This may create a new stack slot, or reuse an existing outgoing stack slot with the requested offset and size.
The requested offset is relative to this function’s stack pointer immediately before making the call.
pub fn get_emergency_slot(
&mut self,
ty: Type,
in_use: &[PackedOption<StackSlot>]
) -> StackSlot
[src]
&mut self,
ty: Type,
in_use: &[PackedOption<StackSlot>]
) -> StackSlot
Get an emergency spill slot that can be used to store a ty
value.
This may allocate a new slot, or it may reuse an existing emergency spill slot, excluding
any slots in the in_use
list.
Trait Implementations
impl Clone for StackSlots
[src]
fn clone(&self) -> StackSlots
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StackSlots
[src]
impl Default for StackSlots
[src]
fn default() -> StackSlots
[src]
impl<'de> Deserialize<'de> for StackSlots
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for StackSlots
[src]
impl Index<StackSlot> for StackSlots
[src]
type Output = StackSlotData
The returned type after indexing.
fn index(&self, ss: StackSlot) -> &StackSlotData
[src]
impl IndexMut<StackSlot> for StackSlots
[src]
fn index_mut(&mut self, ss: StackSlot) -> &mut StackSlotData
[src]
impl PartialEq<StackSlots> for StackSlots
[src]
fn eq(&self, other: &StackSlots) -> bool
[src]
fn ne(&self, other: &StackSlots) -> bool
[src]
impl Serialize for StackSlots
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for StackSlots
[src]
impl StructuralPartialEq for StackSlots
[src]
Auto Trait Implementations
impl RefUnwindSafe for StackSlots
impl Send for StackSlots
impl Sync for StackSlots
impl Unpin for StackSlots
impl UnwindSafe for StackSlots
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,