< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.processor/src/org/graalvm/compiler/replacements/processor/NodeIntrinsicHandler.java

Print this page

        

*** 243,266 **** --- 243,275 ---- if (!method.getSimpleName().toString().equals("intrinsify")) { continue; } if (method.getParameters().size() < 2) { + nonMatches.put(method, "Too few arguments"); continue; } VariableElement firstArg = method.getParameters().get(0); if (!isTypeCompatible(firstArg.asType(), processor.getType(GRAPH_BUILDER_CONTEXT_CLASS_NAME))) { + nonMatches.put(method, "First argument isn't of type GraphBuilderContext"); continue; } VariableElement secondArg = method.getParameters().get(1); if (!isTypeCompatible(secondArg.asType(), processor.getType(RESOLVED_JAVA_METHOD_CLASS_NAME))) { + nonMatches.put(method, "Second argument isn't of type ResolvedJavaMethod"); continue; } if (method.getReturnType().getKind() != TypeKind.BOOLEAN) { + nonMatches.put(method, "Doesn't return boolean"); + continue; + } + + if (!method.getModifiers().contains(Modifier.STATIC)) { + nonMatches.put(method, "Method is non-static"); continue; } if (matchSignature(2, method, signature, nonMatches, requiresInjectedStamp)) { found.add(method);
< prev index next >