pub enum ValueDef {
    Result(Inst, usize),
    Param(Block, usize),
    Union(Value, Value),
}
Expand description

Where did a value come from?

Variants§

§

Result(Inst, usize)

Value is the n’th result of an instruction.

§

Param(Block, usize)

Value is the n’th parameter to a block.

§

Union(Value, Value)

Value is a union of two other values.

Implementations§

source§

impl ValueDef

source

pub fn unwrap_inst(&self) -> Inst

Unwrap the instruction where the value was defined, or panic.

source

pub fn inst(&self) -> Option<Inst>

Get the instruction where the value was defined, if any.

source

pub fn unwrap_block(&self) -> Block

Unwrap the block there the parameter is defined, or panic.

source

pub fn pp(self) -> ExpandedProgramPoint

Get the program point where the value was defined.

source

pub fn num(self) -> usize

Get the number component of this definition.

When multiple values are defined at the same program point, this indicates the index of this value.

Trait Implementations§

source§

impl Clone for ValueDef

source§

fn clone(&self) -> ValueDef

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for ValueDef

source§

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

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

impl From<ValueDef> for ExpandedProgramPoint

source§

fn from(def: ValueDef) -> Self

Converts to this type from the input type.
source§

impl From<ValueDef> for ProgramPoint

source§

fn from(def: ValueDef) -> Self

Converts to this type from the input type.
source§

impl PartialEq<ValueDef> for ValueDef

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ValueDef

source§

impl Eq for ValueDef

source§

impl StructuralEq for ValueDef

source§

impl StructuralPartialEq for ValueDef

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.