Mercurial > hg > graal-compiler
changeset 22034:0cebd06508ca
type.isLeaf should promote stamp to exact type
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 19 Jun 2015 09:28:25 -0700 |
parents | 547ae53182bf |
children | f368142e5631 |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java Fri Jun 19 09:28:17 2015 -0700 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java Fri Jun 19 09:28:25 2015 -0700 @@ -40,7 +40,11 @@ protected AbstractObjectStamp(ResolvedJavaType type, boolean exactType, boolean nonNull, boolean alwaysNull) { super(nonNull, alwaysNull); this.type = type; - this.exactType = exactType; + if (!exactType && type != null && type.isLeaf()) { + this.exactType = true; + } else { + this.exactType = exactType; + } } protected abstract AbstractObjectStamp copyWith(ResolvedJavaType newType, boolean newExactType, boolean newNonNull, boolean newAlwaysNull);