[][src]Struct falcon::il::Block

pub struct Block { /* fields omitted */ }

A basic block in Falcon IL.

Methods

impl Block[src]

pub fn address(&self) -> Option<u64>[src]

Get the address of the first instruction in this block

pub fn append(&mut self, other: &Block)[src]

Appends the contents of another Block to this Block.

Instruction indices are updated accordingly.

pub fn index(&self) -> usize[src]

Returns the index of this Block

pub fn instructions(&self) -> &Vec<Instruction>[src]

Returns instructions for this Block

pub fn instructions_mut(&mut self) -> &mut Vec<Instruction>[src]

Returns a mutable reference to the instructions for this Block.

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

Returns try if this Block is empty, meaning it has no Instruction

pub fn instruction(&self, index: usize) -> Option<&Instruction>[src]

Returns an Instruction by index, or None if the instruction does not exist.

pub fn instruction_mut(&mut self, index: usize) -> Option<&mut Instruction>[src]

Returns a mutable reference to an Instruction by index, or None if the Instruction does not exist.

pub fn remove_instruction(&mut self, index: usize) -> Result<()>[src]

Deletes an Instruction by its index.

pub fn phi_nodes(&self) -> &Vec<PhiNode>[src]

Returns phi nodes of this Block

pub fn phi_nodes_mut(&mut self) -> &mut Vec<PhiNode>[src]

Returns a mutable reference to the phi nodes of this Block.

pub fn phi_node(&self, index: usize) -> Option<&PhiNode>[src]

Returns a PhiNode by index, or None if the PhiNode does not exist.

pub fn phi_node_mut(&mut self, index: usize) -> Option<&mut PhiNode>[src]

Returns a mutable reference to a PhiNode by index, or None if the PhiNode does not exist.

pub fn add_phi_node(&mut self, phi_node: PhiNode)[src]

Adds the phi node to this Block.

pub fn temp(&mut self, bits: usize) -> Scalar[src]

Generates a temporary scalar unique to this block.

pub fn assign(&mut self, dst: Scalar, src: Expression)[src]

Adds an assign operation to the end of this block.

pub fn store(&mut self, address: Expression, src: Expression)[src]

Adds a store operation to the end of this block.

pub fn load(&mut self, dst: Scalar, address: Expression)[src]

Adds a load operation to the end of this block.

pub fn branch(&mut self, dst: Expression)[src]

Adds a conditional branch operation to the end of this block.

pub fn intrinsic(&mut self, intrinsic: Intrinsic)[src]

Adds an intrinsic operation to the end of this block.

pub fn nop(&mut self)[src]

Adds a nop operation to the end of this block.

Trait Implementations

impl Clone for Block[src]

impl Debug for Block[src]

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

impl Display for Block[src]

impl Eq for Block[src]

impl Hash for Block[src]

impl Ord for Block[src]

impl PartialEq<Block> for Block[src]

impl PartialOrd<Block> for Block[src]

impl Serialize for Block[src]

impl StructuralEq for Block[src]

impl StructuralPartialEq for Block[src]

impl Vertex for Block[src]

Auto Trait Implementations

impl RefUnwindSafe for Block

impl Send for Block

impl Sync for Block

impl Unpin for Block

impl UnwindSafe for Block

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.