# HG changeset patch # User Thomas Wuerthinger # Date 1422753692 -3600 # Node ID 9544b5f6762615ef1c262a0af247da501d9bdd7f # Parent 1ceffe3a92c762ea479aca69196dcc45ba721e9b Simplify IntegerStamp.meet. Simplify assertion in ArithmeticStamp. diff -r 1ceffe3a92c7 -r 9544b5f67626 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticStamp.java Sun Feb 01 00:51:09 2015 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticStamp.java Sun Feb 01 02:21:32 2015 +0100 @@ -23,6 +23,7 @@ package com.oracle.graal.compiler.common.type; import java.nio.*; +import java.util.*; import com.oracle.graal.api.meta.*; @@ -59,7 +60,7 @@ if (!(obj instanceof ArithmeticStamp)) { return false; } - assert this.ops.toString().equals(((ArithmeticStamp) obj).ops.toString()); + assert Objects.equals(ops, ((ArithmeticStamp) obj).ops); return true; } } diff -r 1ceffe3a92c7 -r 9544b5f67626 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Sun Feb 01 00:51:09 2015 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Sun Feb 01 02:21:32 2015 +0100 @@ -256,9 +256,6 @@ if (!(otherStamp instanceof IntegerStamp)) { return StampFactory.illegal(Kind.Illegal); } - if (equals(otherStamp)) { - return this; - } IntegerStamp other = (IntegerStamp) otherStamp; return createStamp(other, Math.max(upperBound, other.upperBound), Math.min(lowerBound, other.lowerBound), downMask & other.downMask, upMask | other.upMask); }