# HG changeset patch # User Tom Rodriguez # Date 1434731305 25200 # Node ID 0cebd06508cafca0a19648f324a1e58deb7b4b64 # Parent 547ae53182bfae6571e3b375a6449129a06cb7c7 type.isLeaf should promote stamp to exact type diff -r 547ae53182bf -r 0cebd06508ca graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractObjectStamp.java --- 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);