# HG changeset patch # User Doug Simon # Date 1383080378 -3600 # Node ID e09959e910f712479cf0e7fd2c6c9ceca0652d70 # Parent 1f7bca29d15ce6ad8a371fc4b5ad98a416c632ac weakened or commented out assertions that are too strict given the way Truffle makes use of Unsafe diff -r 1f7bca29d15c -r e09959e910f7 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotHostLoweringProvider.java --- 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; } diff -r 1f7bca29d15c -r e09959e910f7 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java --- 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++; }