Mercurial > hg > graal-compiler
changeset 21272:090291af4230
clarifying comments added to HotSpotClassSubstitutions
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 08 May 2015 17:47:01 +0200 |
parents | 1516d26e8f2b |
children | b2e0a485daf0 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotClassSubstitutions.java |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotClassSubstitutions.java Thu May 07 20:14:23 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotClassSubstitutions.java Fri May 08 17:47:01 2015 +0200 @@ -48,6 +48,7 @@ public static boolean isInterface(final Class<?> thisObj) { KlassPointer klass = ClassGetHubNode.readClass(thisObj); if (klass.isNull()) { + // Class for primitive type return false; } else { int accessFlags = klass.readInt(klassAccessFlagsOffset(), KLASS_ACCESS_FLAGS_LOCATION); @@ -58,6 +59,7 @@ public static boolean isArray(final Class<?> thisObj) { KlassPointer klass = ClassGetHubNode.readClass(thisObj); if (klass.isNull()) { + // Class for primitive type return false; } else { return klassIsArray(klass); @@ -85,6 +87,8 @@ } } } + } else { + // Class for primitive type } return null; } @@ -99,6 +103,8 @@ if (klassIsArray(klass)) { return PiNode.asNonNullClass(klass.readObject(arrayKlassComponentMirrorOffset(), ARRAY_KLASS_COMPONENT_MIRROR)); } + } else { + // Class for primitive type } return null; }