# HG changeset patch # User Lukas Stadler # Date 1394038418 -3600 # Node ID 73f5ddd8414d28aab49d69fee8b3d3d95182f54d # Parent 655a4fd5038b16f0177f1f8b4905f47c0bc4bdce clean up snippet-related assertion in GraphBuilderPhase diff -r 655a4fd5038b -r 73f5ddd8414d graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Wed Mar 05 14:01:21 2014 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Wed Mar 05 17:53:38 2014 +0100 @@ -820,10 +820,12 @@ eagerResolvingForSnippets(cpi, opcode); JavaMethod result = constantPool.lookupMethod(cpi, opcode); /* - * assert !graphBuilderConfig.unresolvedIsError() || ((result instanceof - * ResolvedJavaMethod) && ((ResolvedJavaMethod) - * result).getDeclaringClass().isInitialized()) : result; + * In general, one cannot assume that the declaring class being initialized is useful, + * since the actual concrete receiver may be a different class (except for static + * calls). Also, interfaces are initialized only under special circumstances, so that + * this assertion would often fail for interface calls. */ + assert !graphBuilderConfig.unresolvedIsError() || (result instanceof ResolvedJavaMethod && (opcode != INVOKESTATIC || ((ResolvedJavaMethod) result).getDeclaringClass().isInitialized())); return result; }