[][src]Enum p8n_types::Statements

pub enum Statements {
    Bitcode(Bitcode),
    Vector(Vec<Statement>),
}

A possibly compressed IL sequence.

Variants

Bitcode(Bitcode)

Compressed binary encoding for IL statements.

Vector(Vec<Statement>)

Uncompressed statement vector for processing.

Methods

impl Statements[src]

pub fn iter_range<'a>(&'a self, rgn: Range<usize>) -> StatementsIter<'a>[src]

Creates an iterator over IL statements inside rgn.

pub fn rewrite<F: FnMut(&mut Statement, &mut Names, &mut Strings, &mut Segments) -> Result<RewriteControl> + Sized>(
    &mut self,
    rgn: Range<usize>,
    names: &mut Names,
    strings: &mut Strings,
    segments: &mut Segments,
    f: F
) -> Result<Range<usize>>
[src]

Mutate all IL statements in rgn using f.

pub fn insert(
    &mut self,
    pos: usize,
    stmts: Vec<Statement>
) -> Result<Range<usize>>
[src]

Inserts IL statements stmts at position pos.

pub fn remove(&mut self, rgn: Range<usize>)[src]

Removes IL statements in rgn

pub fn append<I: IntoIterator<Item = Statement> + Sized>(
    &mut self,
    i: I
) -> Result<Range<usize>>
[src]

Appends all IL statements in i to the instance.

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

Upper end of the allowable IL statement range.

pub fn pack(
    &mut self,
    basic_blocks: &mut Vec<BasicBlock>,
    mnemonics: &mut Vec<Mnemonic>
) -> Result<()>
[src]

Compress IL statements into bitcode, updates basic_blocks and mnemonics statement ranges.

pub fn unpack(
    &mut self,
    basic_blocks: &mut Vec<BasicBlock>,
    mnemonics: &mut Vec<Mnemonic>
) -> Result<()>
[src]

Uncompress IL statements into bitcode, updates basic_blocks and mnemonics statement ranges.

Trait Implementations

impl Clone for Statements[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Statements[src]

impl Debug for Statements[src]

Auto Trait Implementations

impl Send for Statements

impl Sync for Statements

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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