Enum falcon::il::Operation [−][src]
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: Scalar | |
src: Expression |
Store
Store the value in src at the address given in index.
Fields of Store
index: Expression | |
src: Expression |
Load
Load the value in memory at index and place the result in the variable dst.
Fields of Load
dst: Scalar | |
index: 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]
impl Operation
pub fn assign(dst: Scalar, src: Expression) -> Operation
[src]
pub fn assign(dst: Scalar, src: Expression) -> Operation
Create a new Operation::Assign
.
pub fn store(index: Expression, src: Expression) -> Operation
[src]
pub fn store(index: Expression, src: Expression) -> Operation
Create a new Operation::Store
.
pub fn load(dst: Scalar, index: Expression) -> Operation
[src]
pub fn load(dst: Scalar, index: Expression) -> Operation
Create a new Operation::Load
.
pub fn branch(target: Expression) -> Operation
[src]
pub fn branch(target: Expression) -> Operation
Create a new Operation::Brc
.
pub fn intrinsic(intrinsic: Intrinsic) -> Operation
[src]
pub fn intrinsic(intrinsic: Intrinsic) -> Operation
Create a new Operation::Intrinsic
.
pub fn nop() -> Operation
[src]
pub fn nop() -> Operation
Create a new Operation::Nop
pub fn scalars_read(&self) -> Option<Vec<&Scalar>>
[src]
pub fn scalars_read(&self) -> Option<Vec<&Scalar>>
Get each Scalar
read by this Operation
.
pub fn scalars_read_mut(&mut self) -> Option<Vec<&mut Scalar>>
[src]
pub fn scalars_read_mut(&mut self) -> Option<Vec<&mut Scalar>>
Get a mutable reference to each Scalar
read by this Operation
.
pub fn scalars_written(&self) -> Option<Vec<&Scalar>>
[src]
pub fn scalars_written(&self) -> Option<Vec<&Scalar>>
Get a Vec of the Scalar
s written by this Operation
pub fn scalars_written_mut(&mut self) -> Option<Vec<&mut Scalar>>
[src]
pub fn scalars_written_mut(&mut self) -> Option<Vec<&mut Scalar>>
Get a Vec of mutable referencer to the Scalar
s written by this
Operation
Trait Implementations
impl Clone for Operation
[src]
impl Clone for Operation
fn clone(&self) -> Operation
[src]
fn clone(&self) -> Operation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Operation
[src]
impl Debug for Operation
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Operation
[src]
impl Eq for Operation
impl Hash for Operation
[src]
impl Hash for Operation
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Operation
[src]
impl Ord for Operation
fn cmp(&self, other: &Operation) -> Ordering
[src]
fn cmp(&self, other: &Operation) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialEq for Operation
[src]
impl PartialEq for Operation
fn eq(&self, other: &Operation) -> bool
[src]
fn eq(&self, other: &Operation) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Operation) -> bool
[src]
fn ne(&self, other: &Operation) -> bool
This method tests for !=
.
impl PartialOrd for Operation
[src]
impl PartialOrd for Operation
fn partial_cmp(&self, other: &Operation) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Operation) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Operation) -> bool
[src]
fn lt(&self, other: &Operation) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Operation) -> bool
[src]
fn le(&self, other: &Operation) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Operation) -> bool
[src]
fn gt(&self, other: &Operation) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Operation) -> bool
[src]
fn ge(&self, other: &Operation) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Display for Operation
[src]
impl Display for Operation