Enum cretonne_codegen::ir::ValueLoc
[−]
[src]
pub enum ValueLoc { Unassigned, Reg(RegUnit), Stack(StackSlot), }
Value location.
Variants
Unassigned
This value has not been assigned to a location yet.
Reg(RegUnit)
Value is assigned to a register.
Stack(StackSlot)
Value is assigned to a stack slot.
Methods
impl ValueLoc
[src]
pub fn is_assigned(&self) -> bool
[src]
Is this an assigned location? (That is, not Unassigned
).
pub fn unwrap_reg(self) -> RegUnit
[src]
Get the register unit of this location, or panic.
pub fn unwrap_stack(self) -> StackSlot
[src]
Get the stack slot of this location, or panic.
pub fn display<'a, R: Into<Option<&'a RegInfo>>>(
self,
regs: R
) -> DisplayValueLoc<'a>
[src]
self,
regs: R
) -> DisplayValueLoc<'a>
Return an object that can display this value location, using the register info from the target ISA.
Trait Implementations
impl Copy for ValueLoc
[src]
impl Clone for ValueLoc
[src]
fn clone(&self) -> ValueLoc
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ValueLoc
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for ValueLoc
[src]
fn eq(&self, __arg_0: &ValueLoc) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ValueLoc) -> bool
[src]
This method tests for !=
.