Mercurial > hg > graal-jvmci-8
changeset 18322:9376e7655efc
IntegerStamp.constant only returns a single value stamp for PrimitiveConstants
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sun, 09 Nov 2014 16:59:10 +0100 |
parents | b81405cd0298 |
children | 301c5e3d683a |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Sun Nov 09 16:56:36 2014 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/IntegerStamp.java Sun Nov 09 16:59:10 2014 +0100 @@ -90,8 +90,11 @@ @Override public Stamp constant(Constant c, MetaAccessProvider meta) { - long value = ((PrimitiveConstant) c).asLong(); - return StampFactory.forInteger(getBits(), value, value); + if (c instanceof PrimitiveConstant) { + long value = ((PrimitiveConstant) c).asLong(); + return StampFactory.forInteger(getBits(), value, value); + } + return this; } @Override