Mercurial > hg > graal-compiler
changeset 22260:f68516869b75
ObjectStamp.type == null is java.lang.Object
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 20 Jul 2015 11:19:21 -0700 |
parents | 2241ccc653a0 |
children | 11f9d9c2c1bf |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java |
diffstat | 1 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java Mon Jul 20 11:19:06 2015 -0700 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java Mon Jul 20 11:19:21 2015 -0700 @@ -265,7 +265,7 @@ int result = 1; result = prime * result + super.hashCode(); result = prime * result + (exactType ? 1231 : 1237); - result = prime * result + ((type == null) ? 0 : type.hashCode()); + result = prime * result + ((type == null || type.isJavaLangObject()) ? 0 : type.hashCode()); return result; } @@ -278,7 +278,19 @@ return false; } AbstractObjectStamp other = (AbstractObjectStamp) obj; - if (exactType != other.exactType || !Objects.equals(type, other.type)) { + if (exactType != other.exactType) { + return false; + } + // null == java.lang.Object + if (type == null) { + if (other.type != null && !other.type.isJavaLangObject()) { + return false; + } + } else if (other.type == null) { + if (type != null && !type.isJavaLangObject()) { + return false; + } + } else if (!type.equals(other.type)) { return false; } return super.equals(other);