[−][src]Struct runestick::unit::Assembly
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]
C: AsRef<str>,
Push a raw instruction.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Assembly
impl Send for Assembly
impl Sync for Assembly
impl Unpin for Assembly
impl UnwindSafe for Assembly
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,