Enum cranelift_isle::ir::ExprInst
source · [−]pub enum ExprInst {
ConstInt {
ty: TypeId,
val: i64,
},
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
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl 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 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