From 26d378df1e952adaae56c57ceea1cbea6f8571d5 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 5 Nov 2024 14:45:06 +0100 Subject: [PATCH] Fix `!isExactDouble()` specializations --- .../primitives/impl/ArithmeticPrimitives.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ArithmeticPrimitives.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ArithmeticPrimitives.java index 962faf4ce..731939eca 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ArithmeticPrimitives.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ArithmeticPrimitives.java @@ -151,7 +151,7 @@ protected static final boolean doLongDouble(final long lhs, final double rhs) { return BooleanObject.wrap(lhs > rhs); } - @Specialization(guards = "isExactDouble(lhs)") + @Specialization(guards = "!isExactDouble(lhs)") protected static final boolean doLongDoubleNotExact(final long lhs, final double rhs) { return BooleanObject.wrap(compareNotExact(lhs, rhs) > 0); } @@ -175,7 +175,7 @@ protected static final boolean doLongDouble(final long lhs, final double rhs) { return BooleanObject.wrap(lhs <= rhs); } - @Specialization(guards = "isExactDouble(lhs)") + @Specialization(guards = "!isExactDouble(lhs)") protected static final boolean doLongDoubleNotExact(final long lhs, final double rhs) { return BooleanObject.wrap(compareNotExact(lhs, rhs) <= 0); } @@ -199,7 +199,7 @@ protected static final boolean doLongDouble(final long lhs, final double rhs) { return BooleanObject.wrap(lhs >= rhs); } - @Specialization(guards = "isExactDouble(lhs)") + @Specialization(guards = "!isExactDouble(lhs)") protected static final boolean doLongDoubleNotExact(final long lhs, final double rhs) { return BooleanObject.wrap(compareNotExact(lhs, rhs) >= 0); } @@ -868,7 +868,7 @@ protected static final boolean doDoubleLong(final FloatObject lhs, final long rh return BooleanObject.wrap(lhs.getValue() < rhs); } - @Specialization(guards = "isExactDouble(rhs)") + @Specialization(guards = "!isExactDouble(rhs)") protected static final boolean doDoubleLongNotExact(final FloatObject lhs, final long rhs) { return BooleanObject.wrap(compareNotExact(lhs.getValue(), rhs) < 0); } @@ -892,7 +892,7 @@ protected static final boolean doDoubleLong(final FloatObject lhs, final long rh return BooleanObject.wrap(lhs.getValue() > rhs); } - @Specialization(guards = "isExactDouble(rhs)") + @Specialization(guards = "!isExactDouble(rhs)") protected static final boolean doDoubleLongNotExact(final FloatObject lhs, final long rhs) { return BooleanObject.wrap(compareNotExact(lhs.getValue(), rhs) > 0); } @@ -916,7 +916,7 @@ protected static final boolean doDoubleLong(final FloatObject lhs, final long rh return BooleanObject.wrap(lhs.getValue() <= rhs); } - @Specialization(guards = "isExactDouble(rhs)") + @Specialization(guards = "!isExactDouble(rhs)") protected static final boolean doDoubleLongNotExact(final FloatObject lhs, final long rhs) { return BooleanObject.wrap(compareNotExact(lhs.getValue(), rhs) <= 0); } @@ -940,7 +940,7 @@ protected static final boolean doDoubleLong(final FloatObject lhs, final long rh return BooleanObject.wrap(lhs.getValue() >= rhs); } - @Specialization(guards = "isExactDouble(rhs)") + @Specialization(guards = "!isExactDouble(rhs)") protected static final boolean doDoubleLongNotExact(final FloatObject lhs, final long rhs) { return BooleanObject.wrap(compareNotExact(lhs.getValue(), rhs) >= 0); }