Enum cranelift_isle::ir::ExprInst
source · [−]pub enum ExprInst {
ConstInt {
ty: TypeId,
val: i128,
},
ConstPrim {
ty: TypeId,
val: Sym,
},
CreateVariant {
inputs: Vec<(Value, TypeId)>,
ty: TypeId,
variant: VariantId,
},
Construct {
inputs: Vec<(Value, TypeId)>,
ty: TypeId,
term: TermId,
infallible: bool,
},
Return {
index: usize,
ty: TypeId,
value: Value,
},
}
Expand description
A single Expr instruction.
Variants
ConstInt
Produce a constant integer.
ConstPrim
Produce a constant extern value.
CreateVariant
Fields
inputs: Vec<(Value, TypeId)>
The input arguments that will make up this variant’s fields.
These must be in the same order as the variant’s fields.
ty: TypeId
The enum type.
variant: VariantId
The variant within the enum that we are contructing.
Create a variant.
Construct
Fields
ty: TypeId
The type of the constructor.
term: TermId
The constructor term.
infallible: bool
Whether this constructor is infallible or not.
Invoke a constructor.
Return
Fields
index: usize
The index of the return value to set.
ty: TypeId
The type of the return value.
value: Value
The value to set as the index
th return value.
Set the Nth return value. Produces no values.
Implementations
Trait Implementations
sourceimpl Ord for ExprInst
impl Ord for ExprInst
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<ExprInst> for ExprInst
impl PartialOrd<ExprInst> for ExprInst
sourcefn partial_cmp(&self, other: &ExprInst) -> Option<Ordering>
fn partial_cmp(&self, other: &ExprInst) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ExprInst
impl StructuralEq for ExprInst
impl StructuralPartialEq for ExprInst
Auto Trait Implementations
impl RefUnwindSafe for ExprInst
impl Send for ExprInst
impl Sync for ExprInst
impl Unpin for ExprInst
impl UnwindSafe for ExprInst
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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