# HG changeset patch # User Christian Wimmer # Date 1369782936 25200 # Node ID fcfedd3dd2eb1cf9ee6d366c3ea8b6acd68672f4 # Parent df223ca2d6af120d353aacefd96289e6585e2f9c ResolvedJavaType.isAssignableFrom must not be called with null argument. Check that with assertions in HotSpot implementation. diff -r df223ca2d6af -r fcfedd3dd2eb graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Tue May 28 16:13:15 2013 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Tue May 28 16:15:36 2013 -0700 @@ -313,6 +313,7 @@ @Override public boolean isAssignableFrom(ResolvedJavaType other) { + assert other != null; if (other instanceof HotSpotResolvedObjectType) { HotSpotResolvedObjectType otherType = (HotSpotResolvedObjectType) other; return javaMirror.isAssignableFrom(otherType.javaMirror); diff -r df223ca2d6af -r fcfedd3dd2eb graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedPrimitiveType.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedPrimitiveType.java Tue May 28 16:13:15 2013 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedPrimitiveType.java Tue May 28 16:15:36 2013 -0700 @@ -129,6 +129,7 @@ @Override public boolean isAssignableFrom(ResolvedJavaType other) { + assert other != null; return other == this; } diff -r df223ca2d6af -r fcfedd3dd2eb graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java Tue May 28 16:13:15 2013 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreIndexedNode.java Tue May 28 16:15:36 2013 -0700 @@ -74,7 +74,7 @@ int index = indexValue.isConstant() ? indexValue.asConstant().asInt() : -1; if (index >= 0 && index < arrayState.getVirtualObject().entryCount()) { ResolvedJavaType componentType = arrayState.getVirtualObject().type().getComponentType(); - if (componentType.isPrimitive() || value.objectStamp().alwaysNull() || componentType.isAssignableFrom(value.objectStamp().type())) { + if (componentType.isPrimitive() || value.objectStamp().alwaysNull() || (value.objectStamp().type() != null && componentType.isAssignableFrom(value.objectStamp().type()))) { tool.setVirtualEntry(arrayState, index, value()); tool.delete(); }