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
Binary
Cast
Load
load(space:size, ptr) — read size bytes from address ptr in the
named space.
Store
store(space:size, ptr <- value) — write value (size bytes) to
address ptr in the named space.
FuncCall
Intrinsic
A pure intrinsic call, e.g. $rol(%x, %k). name excludes the $.
Apply
apply lambda(args...) — value-level application of a pure lambda.
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.
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.
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.
Gep
gep(base.field) — compute the address of a struct field (typed, named
pointer arithmetic; no memory access).
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.