* Reduce code duplication in TypeConstraint subclasses; Add ConstrainWiderOrEqual to ti and to ireduce,{s,u}extend and f{promote,demote}; Fix bug in emitting constraint edges in TypeEnv.dot(); Modify runtime constraint checks to reject match when they encounter overflow
* Rename Constrain types to something shorter; Move lane_bits/lane_counts in subclasses of ValueType; Add wider_or_eq function in rust and python;
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
962c945a3c
commit
7c438f866c
@@ -236,6 +236,13 @@ impl Type {
|
||||
pub fn index(self) -> usize {
|
||||
self.0 as usize
|
||||
}
|
||||
|
||||
/// True iff:
|
||||
/// 1) self.lane_count() == other.lane_count() and
|
||||
/// 2) self.lane_bits() >= other.lane_bits()
|
||||
pub fn wider_or_equal(self, other: Type) -> bool {
|
||||
self.lane_count() == other.lane_count() && self.lane_bits() >= other.lane_bits()
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Type {
|
||||
|
||||
Reference in New Issue
Block a user