Enum cranelift_isle::sema::Expr
source · pub enum Expr {
Term(TypeId, TermId, Vec<Expr>),
Var(TypeId, VarId),
ConstInt(TypeId, i128),
ConstPrim(TypeId, Sym),
Let {
ty: TypeId,
bindings: Vec<(VarId, TypeId, Box<Expr>)>,
body: Box<Expr>,
},
}
Expand description
A right-hand side expression of some rule.
Variants§
Term(TypeId, TermId, Vec<Expr>)
Invoke this term constructor with the given arguments.
Var(TypeId, VarId)
Get the value of a variable that was bound in the left-hand side.
ConstInt(TypeId, i128)
Get a constant integer.
ConstPrim(TypeId, Sym)
Get a constant primitive.
Let
Fields
Evaluate the nested expressions and bind their results to the given variables, then evaluate the body expression.
Implementations§
Trait Implementations§
source§impl PartialEq<Expr> for Expr
impl PartialEq<Expr> for Expr
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
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