comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java @ 18823:5a21cac1968f

Add utilities ModifiersProvider#isConcrete, ResolvedJavaMethod#hasReceiver, ResolvedJavaMethod#hasBytecodes to Graal API.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 11 Jan 2015 18:12:51 +0100
parents fad37aaed6d2
children f57d86eb036f
comparison
equal deleted inserted replaced
18822:fad37aaed6d2 18823:5a21cac1968f
79 assert usages().count() <= 1 : "call target may only be used by a single invoke"; 79 assert usages().count() <= 1 : "call target may only be used by a single invoke";
80 for (Node n : usages()) { 80 for (Node n : usages()) {
81 assertTrue(n instanceof Invoke, "call target can only be used from an invoke (%s)", n); 81 assertTrue(n instanceof Invoke, "call target can only be used from an invoke (%s)", n);
82 } 82 }
83 if (invokeKind().isDirect()) { 83 if (invokeKind().isDirect()) {
84 assertFalse(targetMethod().isAbstract(), "special calls or static calls are only allowed for concrete methods (%s)", targetMethod()); 84 assertTrue(targetMethod().isConcrete(), "special calls or static calls are only allowed for concrete methods (%s)", targetMethod());
85 } 85 }
86 if (invokeKind() == InvokeKind.Static) { 86 if (invokeKind() == InvokeKind.Static) {
87 assertTrue(targetMethod().isStatic(), "static calls are only allowed for static methods (%s)", targetMethod()); 87 assertTrue(targetMethod().isStatic(), "static calls are only allowed for static methods (%s)", targetMethod());
88 } else { 88 } else {
89 assertFalse(targetMethod().isStatic(), "static calls are only allowed for non-static methods (%s)", targetMethod()); 89 assertFalse(targetMethod().isStatic(), "static calls are only allowed for non-static methods (%s)", targetMethod());