use of org.graalvm.compiler.nodeinfo.InputType in project graal by oracle.
the class NodeIntrinsicVerifier method checkInputType.
private void checkInputType(TypeElement nodeClass, TypeMirror returnType, Element element, AnnotationMirror annotation) {
InputType inputType = getInputType(returnType, element, annotation);
if (inputType != InputType.Value) {
boolean allowed = false;
InputType[] allowedTypes = nodeClass.getAnnotation(NodeInfo.class).allowedUsageTypes();
for (InputType allowedType : allowedTypes) {
if (inputType == allowedType) {
allowed = true;
break;
}
}
if (!allowed) {
env.getMessager().printMessage(Kind.ERROR, String.format("@NodeIntrinsic returns input type %s, but only %s is allowed.", inputType, Arrays.toString(allowedTypes)), element, annotation);
}
}
}