Annotation Interface ForceQuickening
@Retention(SOURCE)
@Target(METHOD)
@Repeatable(ForceQuickening.Repeat.class)
public @interface ForceQuickening
Forces quickening for an
Operation specialization. To quicken a
combination of specializations, use the same name. If no name is specified then
only the annotated specialization is quickened. It is possible to specify multiple quickenings
per specialization (e.g., if a specialization is quickened individually and in a group of
specializations).
For example, the following code declares two quickenings: one that supports only ints
(the plain @ForceQuickening on doInts), and another that supports both
ints and doubles (@ForceQuickening("primitives")):
@Operation
public static final class Add {
@Specialization
@ForceQuickening
@ForceQuickening("primitives")
public static int doInts(int lhs, int rhs) {
return lhs + rhs;
}
@Specialization
@ForceQuickening("primitives")
public static double doDoubles(double lhs, double rhs) {
return lhs + rhs;
}
@Specialization
@TruffleBoundary
public static String doStrings(String lhs, String rhs) {
return lhs + rhs;
}
}
- Since:
- 24.2
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueThe name of the quickening group. If nonempty, all specializations annotated with the same value will be included in a quickened instruction together. By default, this value is empty, which signifies that a specialization should have its own quickened instruction.- Since:
- 24.2
- Default:
""
-