Enum lovm2::gen::lir::LirElement[][src]

pub enum LirElement<'hir> {
    Call {
        argn: u8,
        ident: &'hir Variable,
    },
    Conv {
        tyid: ValueType,
    },
    Entry {
        ident: &'hir Variable,
    },
    Jump {
        condition: Option<bool>,
        label: Label,
    },
    Label(Label),
    Operation(Operator),
    PushConstant {
        value: Cow<'hir, Value>,
    },
    PushDynamic {
        ident: &'hir Variable,
        scope: Scope,
    },
    StoreDynamic {
        ident: &'hir Variable,
        scope: Scope,
    },
    Import {
        namespaced: bool,
    },
    Box,
    Drop,
    Duplicate,
    Get,
    RGet,
    Interrupt(u16),
    Ret,
    Set,
    Slice,
    IterCreate,
    IterCreateRanged,
    IterHasNext,
    IterNext,
    IterReverse,
}

Sum type for every LIR element.

Variants

Call

Fields of Call

argn: u8ident: &'hir Variable
Conv

Fields of Conv

tyid: ValueType
Entry

Fields of Entry

ident: &'hir Variable
Jump

Fields of Jump

condition: Option<bool>label: Label
Label(Label)
Operation(Operator)
PushConstant

Fields of PushConstant

value: Cow<'hir, Value>
PushDynamic

Fields of PushDynamic

ident: &'hir Variablescope: Scope
StoreDynamic

Fields of StoreDynamic

ident: &'hir Variablescope: Scope
Import

Fields of Import

namespaced: bool
Box
Drop
Duplicate
Get
RGet
Interrupt(u16)
Ret
Set
Slice
IterCreate
IterCreateRanged
IterHasNext
IterNext
IterReverse

Implementations

impl<'hir> LirElement<'hir>[src]

pub fn call(ident: &'hir Variable, argn: u8) -> LirElement<'hir>[src]

pub fn conv(tyid: ValueType) -> LirElement<'hir>[src]

pub fn entry(ident: &'hir Variable) -> LirElement<'hir>[src]

pub fn jump(label: Label) -> LirElement<'hir>[src]

pub fn jump_conditional(cond: bool, label: Label) -> LirElement<'hir>[src]

pub fn push_constant(value: &'hir Value) -> LirElement<'hir>[src]

pub fn push_constant_owned(value: Value) -> LirElement<'hir>[src]

pub fn push_dynamic(scope: Scope, ident: &'hir Variable) -> LirElement<'hir>[src]

pub fn operation<T>(op: T) -> LirElement<'hir> where
    T: Into<Operator>, 
[src]

pub fn store(scope: Scope, ident: &'hir Variable) -> LirElement<'hir>[src]

Trait Implementations

impl<'hir> Clone for LirElement<'hir>[src]

impl<'hir> Debug for LirElement<'hir>[src]

impl<'_> Display for LirElement<'_>[src]

Auto Trait Implementations

impl<'hir> !RefUnwindSafe for LirElement<'hir>[src]

impl<'hir> !Send for LirElement<'hir>[src]

impl<'hir> !Sync for LirElement<'hir>[src]

impl<'hir> Unpin for LirElement<'hir>[src]

impl<'hir> !UnwindSafe for LirElement<'hir>[src]

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