changeset 15733:ca19a71c8566

In MethodCallTargetNode.canonicalize, uniqueConcreteType.resolveMethod can return null in some cases
author Gilles Duboscq <duboscq@ssw.jku.at>
date Sat, 17 May 2014 18:42:42 +0200
parents 08f131535f9a
children bc37e2efc0c2
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Sat May 17 18:08:57 2014 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java	Sat May 17 18:42:42 2014 +0200
@@ -154,11 +154,12 @@
                     ResolvedJavaType uniqueConcreteType = type.findUniqueConcreteSubtype();
                     if (uniqueConcreteType != null) {
                         ResolvedJavaMethod methodFromUniqueType = uniqueConcreteType.resolveMethod(targetMethod, invoke().getContextType());
-                        assert methodFromUniqueType != null;
-                        tool.assumptions().recordConcreteSubtype(type, uniqueConcreteType);
-                        invokeKind = InvokeKind.Special;
-                        targetMethod = methodFromUniqueType;
-                        return this;
+                        if (methodFromUniqueType != null) {
+                            tool.assumptions().recordConcreteSubtype(type, uniqueConcreteType);
+                            invokeKind = InvokeKind.Special;
+                            targetMethod = methodFromUniqueType;
+                            return this;
+                        }
                     }
 
                     ResolvedJavaMethod uniqueConcreteMethod = type.findUniqueConcreteMethod(targetMethod);