pub enum LcnfLetValue {
App(LcnfArg, Vec<LcnfArg>),
Proj(String, u32, LcnfVarId),
Ctor(String, u32, Vec<LcnfArg>),
Lit(LcnfLit),
Erased,
FVar(LcnfVarId),
Reset(LcnfVarId),
Reuse(LcnfVarId, String, u32, Vec<LcnfArg>),
}Expand description
A let-bound value in LCNF.
In ANF, every complex operation is let-bound so that arguments to subsequent operations are always atomic.
Variants§
App(LcnfArg, Vec<LcnfArg>)
Function application: f(args...).
Proj(String, u32, LcnfVarId)
Projection: proj_idx(struct_var).
Ctor(String, u32, Vec<LcnfArg>)
Constructor application: Ctor(args...).
Lit(LcnfLit)
Literal value.
Erased
Erased value.
FVar(LcnfVarId)
A free variable reference (unresolved).
Reset(LcnfVarId)
Reset (free fields of) a unique object, returning a reusable memory slot. Used by the reset-reuse optimization to recycle allocations.
Reuse(LcnfVarId, String, u32, Vec<LcnfArg>)
Reuse a freed slot to construct a new value.
Reuse(slot, ctor_name, ctor_tag, args) — like Ctor but using pre-allocated memory.
Trait Implementations§
Source§impl Clone for LcnfLetValue
impl Clone for LcnfLetValue
Source§fn clone(&self) -> LcnfLetValue
fn clone(&self) -> LcnfLetValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LcnfLetValue
impl Debug for LcnfLetValue
Source§impl Display for LcnfLetValue
impl Display for LcnfLetValue
Source§impl PartialEq for LcnfLetValue
impl PartialEq for LcnfLetValue
impl StructuralPartialEq for LcnfLetValue
Auto Trait Implementations§
impl Freeze for LcnfLetValue
impl RefUnwindSafe for LcnfLetValue
impl Send for LcnfLetValue
impl Sync for LcnfLetValue
impl Unpin for LcnfLetValue
impl UnsafeUnpin for LcnfLetValue
impl UnwindSafe for LcnfLetValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more