Enum cranelift_isle::sema::Expr
source · [−]pub enum Expr {
Term(TypeId, TermId, Vec<Expr>),
Var(TypeId, VarId),
ConstInt(TypeId, i64),
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, i64)
Get a constant integer.
ConstPrim(TypeId, Sym)
Get a constant primitive.
Let
Fields
ty: TypeId
The type of the result of this let expression.
Evaluate the nested expressions and bind their results to the given variables, then evaluate the body expression.
Implementations
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more