[][src]Struct runestick::Assembly

pub struct Assembly { /* fields omitted */ }

Helper structure to build instructions and maintain certain invariants.

Implementations

impl Assembly[src]

pub fn new_label(&mut self, name: &'static str) -> Label[src]

Construct and return a new label.

pub fn label(&mut self, label: Label) -> Result<Label, UnitError>[src]

Apply the label at the current instruction offset.

pub fn jump(&mut self, label: Label, span: Span)[src]

Add a jump to the given label.

pub fn jump_if(&mut self, label: Label, span: Span)[src]

Add a conditional jump to the given label.

pub fn jump_if_not(&mut self, label: Label, span: Span)[src]

Add a conditional jump to the given label.

pub fn jump_if_branch(&mut self, branch: i64, label: Label, span: Span)[src]

Add a conditional jump-if-branch instruction.

pub fn pop_and_jump_if(&mut self, count: usize, label: Label, span: Span)[src]

Add a pop-and-jump-if instruction to a label.

pub fn pop_and_jump_if_not(&mut self, count: usize, label: Label, span: Span)[src]

Add a pop-and-jump-if-not instruction to a label.

pub fn push(&mut self, raw: Inst, span: Span)[src]

Push a raw instruction.

pub fn push_with_comment<C>(&mut self, raw: Inst, span: Span, comment: C) where
    C: AsRef<str>, 
[src]

Push a raw instruction.

Trait Implementations

impl Clone for Assembly[src]

impl Debug for Assembly[src]

impl Default for Assembly[src]

Auto Trait Implementations

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> 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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,