Mercurial > hg > truffle
changeset 19056:9544b5f67626
Simplify IntegerStamp.meet. Simplify assertion in ArithmeticStamp.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 01 Feb 2015 02:21:32 +0100 |
parents | 1ceffe3a92c7 |
children | a8bcda325946 |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/ArithmeticStamp.java graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java |
diffstat | 2 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }
--- 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); }