Skip to main content

ResolvedLeafOp

Enum ResolvedLeafOp 

Source
pub enum ResolvedLeafOp<'a> {
    FieldAccess {
        object: &'a Spanned<ResolvedExpr>,
        field_name: &'a str,
    },
    MapGet {
        map: &'a Spanned<ResolvedExpr>,
        key: &'a Spanned<ResolvedExpr>,
    },
    MapSet {
        map: &'a Spanned<ResolvedExpr>,
        key: &'a Spanned<ResolvedExpr>,
        value: &'a Spanned<ResolvedExpr>,
    },
    VectorNew {
        size: &'a Spanned<ResolvedExpr>,
        fill: &'a Spanned<ResolvedExpr>,
    },
    VectorSetOrDefaultSameVector {
        vector: &'a Spanned<ResolvedExpr>,
        index: &'a Spanned<ResolvedExpr>,
        value: &'a Spanned<ResolvedExpr>,
    },
    VectorGetOrDefaultLiteral {
        vector: &'a Spanned<ResolvedExpr>,
        index: &'a Spanned<ResolvedExpr>,
        default_literal: &'a Literal,
    },
    IntModOrDefaultLiteral {
        a: &'a Spanned<ResolvedExpr>,
        b: &'a Spanned<ResolvedExpr>,
        default_literal: &'a Literal,
    },
    IntDivOrDefaultLiteral {
        a: &'a Spanned<ResolvedExpr>,
        b: &'a Spanned<ResolvedExpr>,
        default_literal: &'a Literal,
    },
    ListIndexGet {
        list: &'a Spanned<ResolvedExpr>,
        index: &'a Spanned<ResolvedExpr>,
    },
    NoneValue,
    VariantConstructor {
        qualified_type_name: String,
        variant_name: String,
    },
    StaticRef(String),
}
Expand description

Mirror of crate::ir::LeafOp keyed against ResolvedExpr.

Each variant’s fields are deliberately preserved (even when the VM compiler currently consumes the leaf by walking the original ResolvedExpr instead of these borrows) — keeps the shape documentation aligned with crate::ir::LeafOp for cross-reading and leaves room for future consumers that prefer the typed borrows over re-walking. Suppress the dead-code lint at the type level rather than per-field so the docs stay flat.

Variants§

§

FieldAccess

Fields

§object: &'a Spanned<ResolvedExpr>
§field_name: &'a str
§

MapGet

Fields

§

MapSet

§

VectorNew

Fields

§

VectorSetOrDefaultSameVector

Fields

§vector: &'a Spanned<ResolvedExpr>
§

VectorGetOrDefaultLiteral

Fields

§vector: &'a Spanned<ResolvedExpr>
§default_literal: &'a Literal
§

IntModOrDefaultLiteral

Fields

§default_literal: &'a Literal
§

IntDivOrDefaultLiteral

Fields

§default_literal: &'a Literal
§

ListIndexGet

Fields

§

NoneValue

§

VariantConstructor

Fields

§qualified_type_name: String
§variant_name: String
§

StaticRef(String)

Auto Trait Implementations§

§

impl<'a> Freeze for ResolvedLeafOp<'a>

§

impl<'a> RefUnwindSafe for ResolvedLeafOp<'a>

§

impl<'a> Send for ResolvedLeafOp<'a>

§

impl<'a> Sync for ResolvedLeafOp<'a>

§

impl<'a> Unpin for ResolvedLeafOp<'a>

§

impl<'a> UnsafeUnpin for ResolvedLeafOp<'a>

§

impl<'a> UnwindSafe for ResolvedLeafOp<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V