Enum falcon::il::Operation
[−]
[src]
pub enum Operation { Assign { dst: Scalar, src: Expression, }, Store { dst: Array, index: Expression, src: Expression, }, Load { dst: Scalar, index: Expression, src: Array, }, Brc { target: Expression, condition: Expression, }, Raise { expr: Expression, }, }
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 given by expression at the address given.
Fields of Store
dst: Array | |
index: Expression | |
src: Expression |
Load
Load the value given by address and place the result in the variable dst.
Fields of Load
dst: Scalar | |
index: Expression | |
src: Array |
Brc
If condition is non-zero, branch to the value given by dst.
Fields of Brc
target: Expression | |
condition: Expression |
Raise
Raise operation for handling things such as system calls
Fields of Raise
expr: Expression |
Methods
impl Operation
[src]
fn assign(dst: Scalar, src: Expression) -> Operation
[src]
Create a new Operation::Assign
.
fn store(dst: Array, index: Expression, src: Expression) -> Operation
[src]
Create a new Operation::Store
.
fn load(dst: Scalar, index: Expression, src: Array) -> Operation
[src]
Create a new Operation::Load
.
fn brc(target: Expression, condition: Expression) -> Operation
[src]
Create a new Operation::Brc
.
fn raise(expr: Expression) -> Operation
[src]
Create a new Operation::Raise
.
fn variables_read(&self) -> Vec<&Variable>
[src]
Get eacn Variable
read by this Operation
.
fn variables_read_mut(&mut self) -> Vec<&mut Variable>
[src]
Get a mutable reference to each Variable
read by this Operation
.
fn variable_written(&self) -> Option<&Variable>
[src]
Get a reference to the Variable
written by this Operation
, or None
if no Variable
is written.
fn variable_written_mut(&mut self) -> Option<&mut Variable>
[src]
Get a mutable reference to the Variable
written by this Operation
, or None
,
if no Variable
is written.
Trait Implementations
impl Clone for Operation
[src]
fn clone(&self) -> Operation
[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 Operation
[src]
impl Eq for Operation
[src]
impl Hash for Operation
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Operation
[src]
fn cmp(&self, __arg_0: &Operation) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialEq for Operation
[src]
fn eq(&self, __arg_0: &Operation) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Operation) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Operation
[src]
fn partial_cmp(&self, __arg_0: &Operation) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Operation) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Operation) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Operation) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Operation) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more