pub struct SpillManager { /* private fields */ }Expand description
Manages spill slots for values that cannot fit on the stack.
Implementations§
Source§impl SpillManager
impl SpillManager
Sourcepub fn allocate(&mut self, value: ValueId) -> SpillSlot
pub fn allocate(&mut self, value: ValueId) -> SpillSlot
Allocates a spill slot for a value. If the value already has a slot, returns the existing one.
Sourcepub fn get(&self, value: ValueId) -> Option<SpillSlot>
pub fn get(&self, value: ValueId) -> Option<SpillSlot>
Returns the spill slot for a value, if one exists.
Sourcepub fn is_spilled(&self, value: ValueId) -> bool
pub fn is_spilled(&self, value: ValueId) -> bool
Returns true if the value is currently spilled.
Sourcepub fn mark_reloadable(&mut self, value: ValueId)
pub fn mark_reloadable(&mut self, value: ValueId)
Marks a value’s spill slot as reloadable at the current program point.
Sourcepub fn mark_stored(&mut self, value: ValueId)
pub fn mark_stored(&mut self, value: ValueId)
Marks a value’s spill slot as written by emitted code.
Sourcepub fn is_reloadable(&self, value: ValueId) -> bool
pub fn is_reloadable(&self, value: ValueId) -> bool
Returns true if the value has a spill slot that can be loaded.
Sourcepub fn is_stored(&self, value: ValueId) -> bool
pub fn is_stored(&self, value: ValueId) -> bool
Returns true if already-emitted code has stored this value.
Sourcepub fn free(&mut self, value: ValueId)
pub fn free(&mut self, value: ValueId)
Frees a spill slot (when the value is reloaded and no longer needed in memory). Note: Simple implementation doesn’t reuse slots.
Sourcepub fn spill_area_size(&self) -> u32
pub fn spill_area_size(&self) -> u32
Returns the total size of the spill area in bytes.
Trait Implementations§
Source§impl Clone for SpillManager
impl Clone for SpillManager
Source§fn clone(&self) -> SpillManager
fn clone(&self) -> SpillManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SpillManager
impl Debug for SpillManager
Auto Trait Implementations§
impl Freeze for SpillManager
impl RefUnwindSafe for SpillManager
impl Send for SpillManager
impl Sync for SpillManager
impl Unpin for SpillManager
impl UnsafeUnpin for SpillManager
impl UnwindSafe for SpillManager
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
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