diff --git a/cranelift/interpreter/src/step.rs b/cranelift/interpreter/src/step.rs index 2843be21f6..a29590e6a7 100644 --- a/cranelift/interpreter/src/step.rs +++ b/cranelift/interpreter/src/step.rs @@ -720,8 +720,8 @@ where &left.clone().convert(ValueConversionKind::ToUnsigned)?, &right.clone().convert(ValueConversionKind::ToUnsigned)?, )?, - IntCC::Overflow => Value::of(left, right)?, - IntCC::NotOverflow => !Value::of(left, right)?, + IntCC::Overflow => Value::overflow(left, right)?, + IntCC::NotOverflow => !Value::overflow(left, right)?, }) } diff --git a/cranelift/interpreter/src/value.rs b/cranelift/interpreter/src/value.rs index 492a7e5fef..991e83bad3 100644 --- a/cranelift/interpreter/src/value.rs +++ b/cranelift/interpreter/src/value.rs @@ -37,7 +37,7 @@ pub trait Value: Clone + From { Ok(other.eq(self)? || other.gt(self)?) } fn uno(&self, other: &Self) -> ValueResult; - fn of(&self, other: &Self) -> ValueResult; + fn overflow(&self, other: &Self) -> ValueResult; // Arithmetic. fn add(self, other: Self) -> ValueResult; @@ -278,7 +278,7 @@ impl Value for DataValue { Ok(self.is_nan()? || other.is_nan()?) } - fn of(&self, other: &Self) -> ValueResult { + fn overflow(&self, other: &Self) -> ValueResult { Ok(match (self, other) { (DataValue::I8(a), DataValue::I8(b)) => a.checked_sub(*b).is_none(), (DataValue::I16(a), DataValue::I16(b)) => a.checked_sub(*b).is_none(),