Mercurial > hg > truffle
changeset 10744:45dc193567c2
Add assertions
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Mon, 15 Jul 2013 10:48:10 +0200 |
parents | bdd7c8e2293e |
children | cbaf26740df8 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Fri Jul 12 23:26:01 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Mon Jul 15 10:48:10 2013 +0200 @@ -1168,7 +1168,11 @@ return Constant.forInt(base == null ? unsafe.getInt(displacement) : unsafe.getInt(base, displacement)); case Long: if (displacement == config().hubOffset && this.getGraalRuntime().getRuntime().config.useCompressedKlassPointers) { - return Constant.forLong(this.getGraalRuntime().getCompilerToVM().readUnsafeKlassPointer(base)); + if (base == null) { + throw new GraalInternalError("Base of object must not be null"); + } else { + return Constant.forLong(this.getGraalRuntime().getCompilerToVM().readUnsafeKlassPointer(base)); + } } else { return Constant.forLong(base == null ? unsafe.getLong(displacement) : unsafe.getLong(base, displacement)); }