Mercurial > hg > truffle
changeset 16424:1bed6de938cd
Truffle: if value is null use instance stamps, not class or type stamps.
author | Danilo Ansaloni <danilo.ansaloni@oracle.com> |
---|---|
date | Tue, 08 Jul 2014 15:59:34 +0200 |
parents | a9b85fe36dbc |
children | 8eec87d7bfc4 efbf9195dfcb |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/DefaultTruffleStamp.java |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/DefaultTruffleStamp.java Tue Jul 08 14:25:55 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/DefaultTruffleStamp.java Tue Jul 08 15:59:34 2014 +0200 @@ -46,6 +46,7 @@ return ArrayStamp.INSTANCE.joinValue(value); } else if (!useInstanceStamps(value)) { Object type = getTypeIdentifier(value); + assert value != null; if (type != NO_TYPE) { return new TypeStamp(value.getClass(), type); } else { @@ -57,6 +58,9 @@ } private static boolean useInstanceStamps(Object value) { + if (value == null) { + return true; + } if (TruffleCompilerOptions.TruffleSplittingTypeInstanceStamps.getValue()) { if (value instanceof TypedObject) { return true;