Mercurial > hg > truffle
changeset 12626:e09959e910f7
weakened or commented out assertions that are too strict given the way Truffle makes use of Unsafe
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 29 Oct 2013 21:59:38 +0100 |
parents | 1f7bca29d15c |
children | 9cd8dbb8a37d |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotHostLoweringProvider.java graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotHostLoweringProvider.java Tue Oct 29 17:26:23 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotHostLoweringProvider.java Tue Oct 29 21:59:38 2013 +0100 @@ -350,9 +350,12 @@ // Constant.illegal is always the defaultForKind, so it is skipped Kind componentKind = element.getKind(); Kind accessKind; - if (value.kind().getStackKind() != componentKind.getStackKind()) { - assert value.kind() == Kind.Long || value.kind() == Kind.Double; - accessKind = value.kind(); + Kind valueKind = value.kind(); + if (valueKind.getStackKind() != componentKind.getStackKind()) { + // Given how Truffle uses unsafe, it can happen that + // valueKind is Kind.Int + // assert valueKind == Kind.Long || valueKind == Kind.Double; + accessKind = valueKind; } else { accessKind = componentKind; }
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Tue Oct 29 17:26:23 2013 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Tue Oct 29 21:59:38 2013 +0100 @@ -425,7 +425,7 @@ // skip the next entry valueIndex++; } else { - assert entryKind.getStackKind() == otherKind.getStackKind() : entryKind + " vs " + otherKind; + assert entryKind.getStackKind() == otherKind.getStackKind() || entryKind.getBitCount() >= otherKind.getBitCount() : entryKind + " vs " + otherKind; } valueIndex++; }