Skip to main content

ExprNode

Enum ExprNode 

Source
pub enum ExprNode {
Show 15 variants Atom(TypedAtom), Unop { op: String, src: TypedAtom, }, Binary { lhs: TypedAtom, op: String, rhs: TypedAtom, }, Cast { op: CastOp, size_bytes: usize, src: TypedAtom, }, Load { space: String, size_bytes: usize, ptr: TypedAtom, }, Store { space: String, size_bytes: usize, ptr: TypedAtom, src: TypedAtom, }, FuncCall { op: String, args: Vec<TypedAtom>, }, Intrinsic { name: String, args: Vec<TypedAtom>, }, Apply { target: Callee, args: Vec<TypedAtom>, }, Map { body: Callee, src: TypedAtom, captures: Vec<TypedAtom>, }, Scan { body: Callee, init: TypedAtom, src: TypedAtom, captures: Vec<TypedAtom>, }, Tuple { fields: Vec<TupleField>, }, Extract { agg: TypedAtom, field: ExtractField, }, Gep { base: TypedAtom, field: GepField, }, Range { src: TypedAtom, start: Option<u64>, end: Option<u64>, },
}

Variants§

§

Atom(TypedAtom)

§

Unop

Fields

§

Binary

Fields

§

Cast

Fields

§size_bytes: usize
§

Load

load(space:size, ptr) — read size bytes from address ptr in the named space.

Fields

§space: String
§size_bytes: usize
§

Store

store(space:size, ptr <- value) — write value (size bytes) to address ptr in the named space.

Fields

§space: String
§size_bytes: usize
§

FuncCall

Fields

§

Intrinsic

A pure intrinsic call, e.g. $rol(%x, %k). name excludes the $.

Fields

§name: String
§

Apply

apply lambda(args...) — value-level application of a pure lambda.

Fields

§target: Callee
§

Map

body <$> src / (body c0 c1) <$> src — an element-wise map over the array src. body is a named function or an unresolved minted callee; captures are the loop-invariant operands the body closes over.

Fields

§body: Callee
§captures: Vec<TypedAtom>
§

Scan

scanl @body init src / scanl (@body c0 c1) init src — a left-scan over the array src. Named bodies are stored without the @; minted bodies use their explicit placeholder. init is the initial accumulator; captures are loop-invariant operands.

Fields

§body: Callee
§captures: Vec<TypedAtom>
§

Tuple

pack(a=x, b=y) — build an aggregate value from its named fields.

Fields

§fields: Vec<TupleField>
§

Extract

extract(agg.field) — project a field out of an aggregate value.

Fields

§

Gep

gep(base.field) — compute the address of a struct field (typed, named pointer arithmetic; no memory access).

Fields

§field: GepField
§

Range

src[start:end] — extract the byte range [start, end) of src. A missing start defaults to 0; a missing end defaults to src’s width.

Fields

§start: Option<u64>

Trait Implementations§

Source§

impl Clone for ExprNode

Source§

fn clone(&self) -> ExprNode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExprNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.