[][src]Enum falcon::il::Operation

pub enum Operation {
    Assign {
        dst: Scalar,
        src: Expression,
    },
    Store {
        index: Expression,
        src: Expression,
    },
    Load {
        dst: Scalar,
        index: Expression,
    },
    Branch {
        target: Expression,
    },
    Intrinsic {
        intrinsic: Intrinsic,
    },
    Nop,
}

An IL Operation updates some state.

Variants

Assign

Assign the value given in expression to the variable indicated.

Fields of Assign

dst: Scalarsrc: Expression
Store

Store the value in src at the address given in index.

Fields of Store

index: Expressionsrc: Expression
Load

Load the value in memory at index and place the result in the variable dst.

Fields of Load

dst: Scalarindex: Expression
Branch

Branch to the value given by target.

Fields of Branch

target: Expression
Intrinsic

Holds an Intrinsic for unmodellable instructions

Fields of Intrinsic

intrinsic: Intrinsic
Nop

An operation that does nothing, and allows for a placeholder Instuction

Methods

impl Operation[src]

pub fn assign(dst: Scalar, src: Expression) -> Operation[src]

Create a new Operation::Assign.

pub fn store(index: Expression, src: Expression) -> Operation[src]

Create a new Operation::Store.

pub fn load(dst: Scalar, index: Expression) -> Operation[src]

Create a new Operation::Load.

pub fn branch(target: Expression) -> Operation[src]

Create a new Operation::Brc.

pub fn intrinsic(intrinsic: Intrinsic) -> Operation[src]

Create a new Operation::Intrinsic.

pub fn nop() -> Operation[src]

Create a new Operation::Nop

pub fn is_assign(&self) -> bool[src]

pub fn is_store(&self) -> bool[src]

pub fn is_load(&self) -> bool[src]

pub fn is_branch(&self) -> bool[src]

pub fn is_intrinsic(&self) -> bool[src]

pub fn is_nop(&self) -> bool[src]

pub fn scalars_read(&self) -> Option<Vec<&Scalar>>[src]

Get each Scalar read by this Operation.

pub fn scalars_read_mut(&mut self) -> Option<Vec<&mut Scalar>>[src]

Get a mutable reference to each Scalar read by this Operation.

pub fn scalars_written(&self) -> Option<Vec<&Scalar>>[src]

Get a Vec of the Scalars written by this Operation

pub fn scalars_written_mut(&mut self) -> Option<Vec<&mut Scalar>>[src]

Get a Vec of mutable referencer to the Scalars written by this Operation

Trait Implementations

impl Clone for Operation[src]

impl Debug for Operation[src]

impl<'de> Deserialize<'de> for Operation[src]

impl Display for Operation[src]

impl Eq for Operation[src]

impl Hash for Operation[src]

impl Ord for Operation[src]

impl PartialEq<Operation> for Operation[src]

impl PartialOrd<Operation> for Operation[src]

impl Serialize for Operation[src]

impl StructuralEq for Operation[src]

impl StructuralPartialEq for Operation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.