[−][src]Trait peepmatic_traits::TypingRules
The typing rules for a TOperator
type.
This trait describes the types of immediates, parameters, and results of an operator type, as well as their arity.
Required methods
pub fn result_type<'a, C>(
&self,
span: C::Span,
typing_context: &mut C
) -> C::TypeVariable where
C: TypingContext<'a>,
[src]
&self,
span: C::Span,
typing_context: &mut C
) -> C::TypeVariable where
C: TypingContext<'a>,
Get the result type of this operator.
pub fn immediates_arity(&self) -> u8
[src]
Get the number of immediates this operator has.
pub fn immediate_types<'a, C>(
&self,
span: C::Span,
typing_context: &mut C,
types: &mut impl Extend<C::TypeVariable>
) where
C: TypingContext<'a>,
[src]
&self,
span: C::Span,
typing_context: &mut C,
types: &mut impl Extend<C::TypeVariable>
) where
C: TypingContext<'a>,
Get the types of this operator's immediates.
pub fn parameters_arity(&self) -> u8
[src]
Get the number of parameters this operator has.
pub fn parameter_types<'a, C>(
&self,
span: C::Span,
typing_context: &mut C,
types: &mut impl Extend<C::TypeVariable>
) where
C: TypingContext<'a>,
[src]
&self,
span: C::Span,
typing_context: &mut C,
types: &mut impl Extend<C::TypeVariable>
) where
C: TypingContext<'a>,
Get the types of this operator's parameters.
pub fn is_reduce(&self) -> bool
[src]
Is this a bit width reducing instruction?
E.g. Cranelift's ireduce
instruction.
pub fn is_extend(&self) -> bool
[src]
Is this a bit width extending instruction?
E.g. Cranelift's uextend
and sextend
instructions.