Class TruffleFromLibGraalProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
com.oracle.truffle.libgraal.processor.BaseProcessor
com.oracle.truffle.libgraal.processor.TruffleFromLibGraalProcessor
- All Implemented Interfaces:
Processor
@SupportedAnnotationTypes({"com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal","com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraalRepeated"})
public class TruffleFromLibGraalProcessor
extends BaseProcessor
Processor for the
jdk.graal.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal
annotation that generates code to push JNI arguments to the stack and make a JNI call
corresponding to a
jdk.graal.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id. This helps
mitigate bugs where incorrect arguments are pushed for a JNI call. Given the low level nature of
org.graalvm.nativeimage.StackValue, it's very hard to use runtime assertion checking.-
Field Summary
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaccept(ExecutableElement annotatedElement) Allows subclasses to filter out annotated elements to generate calls for.final booleandoProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Methods inherited from class com.oracle.truffle.libgraal.processor.BaseProcessor
asTypeElement, createProviderFile, createSourceFile, env, getAnnotation, getAnnotations, getAnnotationValue, getAnnotationValueList, getPackage, getPackageName, getSimpleName, getSupportedSourceVersion, getType, getType, getTypeElement, getTypeElementOrNull, getTypeOrNull, processMethods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, init, isInitialized
-
Constructor Details
-
TruffleFromLibGraalProcessor
public TruffleFromLibGraalProcessor()
-
-
Method Details
-
accept
Allows subclasses to filter out annotated elements to generate calls for. -
doProcess
- Specified by:
doProcessin classBaseProcessor
-