- Latest (GraalVM for JDK 21)
- Dev Build
- GraalVM for JDK 21
- GraalVM for JDK 20
- GraalVM for JDK 17
- GraalVM 22.3
- GraalVM 22.2
- GraalVM 22.1
- GraalVM 22.0
- GraalVM 21.3
- Truffle Language Implementation Framework
- Truffle Branches Instrumentation
- Dynamic Object Model
- Static Object Model
- Host Optimization for Interpreter Code
- Truffle Approach to Function Inlining
- Profiling Truffle Interpreters
- Truffle Interop 2.0
- Language Implementations
- Implementing a New Language with Truffle
- Truffle Native Function Interface
- Optimizing Truffle Interpreters
- On-Stack Replacement
- Truffle Strings Guide
- Specialization Histogram
- Testing DSL Specializations
- Polyglot API Based TCK
- Truffle Approach to the Compilation Queue
- Truffle Library Guide
- Truffle AOT Overview
- Truffle AOT Compilation
- Auxiliary Engine Caching
- Truffle Language Safepoint Tutorial
- Splitting Algorithm
- Monomorphization Use Cases
- Reporting Polymorphic Specializations to Runtime
Truffle DSL Warnings
Since version 23.0, Truffle DSL now produces significantly more warnings. These warnings are intended to guide the user to better DSL usage. The following sections describe how to handle and eventually suppress warnings.
All warnings of Truffle DSL can be suppressed using the
If a language uses strict checks where warnings are treated as errors in their CI, it is recommended to add this option to the Java compilation command line. This can be useful to avoid CI failures when Truffle DSL adds new warning messages. Adding new warning messages in Truffle DSL is considered a compatible change.
Truffle DSL warnings can be suppressed just like Java warnings using the
@SuppressWarnings annotation or with
@SuppressPackageWarnings for entire packages.
The following warning keys are supported:
allall warnings emitted by the Java compiler or Truffle DSL
truffleall warnings emitted by Truffle DSL
truffle-sharingwarnings when the DSL recommends sharing between cached values
truffle-inliningwarnings when the DSL recommends using node object inlining.
truffle-neverdefaultwarnings for when cached initializers should be marked as never having a default value.
truffle-limitwarnings when a specialization limit is recommended, but not specified.
truffle-static-methodwarnings when the DSL recommends to use the
truffle-unusedwarnings if a DSL attribute or annotation has no effect and is recommended to be removed.
truffle-abstract-exportwarnings if an abstract message of a Truffle library is not exported.
truffle-assumptionif the assumptions feature is used with a specialization that reaches a
truffle-guardif a guard uses methods where a
@NonIdempotentmethod may be beneficial for the generated code.
Specific warnings can also be suppressed globally using the
-Atruffle.dsl.SuppressWarnings=truffle-inlining,truffle-neverdefault Java compiler processor option.
Note that also Java system properties can be used to configure the annotation processor. (e.g. by passing
-J-Dtruffle.dsl.SuppressWarnings=truffle-inlining,truffle-neverdefault to javac)
Suppressing a specific warning should be preferred over suppressing all warnings. Find the latest list of warnings in the source code