# HG changeset patch # User Roland Schatz # Date 1400597239 -7200 # Node ID e284afdafe7b9605438dfb32c7069409f951e814 # Parent b5a993ed67ea44ac4227bb1ab93ca5d771980061 Allow using StampFactory.forConstant(Constant, MetaAccessProvider) for primitive constants. diff -r b5a993ed67ea -r e284afdafe7b graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/StampFactory.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/StampFactory.java Tue May 20 15:46:02 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/StampFactory.java Tue May 20 16:47:19 2014 +0200 @@ -200,7 +200,7 @@ ResolvedJavaType type = value.isNull() ? null : metaAccess.lookupJavaType(value); return new ObjectStamp(type, value.isNonNull(), value.isNonNull(), value.isNull()); } else { - throw new GraalInternalError(Kind.Object + " expected, actual kind: %s", value.getKind()); + return forConstant(value); } }