# HG changeset patch # User Doug Simon # Date 1431100021 -7200 # Node ID 090291af42301267c91481051db018868a56654a # Parent 1516d26e8f2b205aa7d8536c2d58f37a7e047097 clarifying comments added to HotSpotClassSubstitutions diff -r 1516d26e8f2b -r 090291af4230 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotClassSubstitutions.java --- 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; }