Struct falcon::il::Block
[−]
[src]
pub struct Block { /* fields omitted */ }
A basic block in Falcon IL.
Methods
impl Block
[src]
fn address(&self) -> Option<u64>
[src]
Get the address of the first instruction in this block
fn append(&mut self, other: &Block)
[src]
Appends the contents of another Block
to this Block
.
Instruction indices are updated accordingly.
fn index(&self) -> u64
[src]
Returns the index of this Block
fn instructions(&self) -> &Vec<Instruction>
[src]
Returns instructions for this Block
fn instructions_mut(&mut self) -> &mut Vec<Instruction>
[src]
Returns a mutable reference to the instructions for this Block
.
fn is_empty(&self) -> bool
[src]
Returns try if this Block
is empty, meaning it has no Instruction
fn instruction(&self, index: u64) -> Option<&Instruction>
[src]
Returns an Instruction
by index, or None
if the instruction does not
exist.
fn instruction_mut(&mut self, index: u64) -> Option<&mut Instruction>
[src]
Returns a mutable reference to an Instruction
by index, or None
if
the Instruction
does not exist.
fn remove_instruction(&mut self, index: u64) -> Result<()>
[src]
Deletes an Instruction
by its index.
fn temp(&mut self, bits: usize) -> Scalar
[src]
Generates a temporary scalar unique to this block.
fn assign(&mut self, dst: Scalar, src: Expression)
[src]
Adds an assign operation to the end of this block.
fn store(&mut self, address: Expression, src: Expression)
[src]
Adds a store operation to the end of this block.
fn load(&mut self, dst: Scalar, address: Expression)
[src]
Adds a load operation to the end of this block.
fn branch(&mut self, dst: Expression)
[src]
Adds a conditional branch operation to the end of this block.
fn raise(&mut self, expr: Expression)
[src]
Adds a raise operation to the end of this block.
Trait Implementations
impl Clone for Block
[src]
fn clone(&self) -> Block
[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 Block
[src]
impl Eq for Block
[src]
impl Hash for Block
[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 Block
[src]
fn cmp(&self, __arg_0: &Block) -> 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 Block
[src]
fn eq(&self, __arg_0: &Block) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Block) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Block
[src]
fn partial_cmp(&self, __arg_0: &Block) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Block) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Block) -> 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: &Block) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Block) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more