@Retention(value=CLASS) @Target(value=TYPE) public @interface GenerateAOT
replaced
by an AOT capable specializations are included for AOT
validation and preparation. If a specialization is not suitable a compilation error will be
shown.
The following properties make a specialization incapable of being used for AOT preparation:
GenerateAOT
.
GenerateAOT.Exclude
, if it is acceptable to deoptimize
for this specialization in AOT compiled code.
Specialization.replaces()
with a more generic
specialization.
After a node generates code for AOT preparation AOTSupport.prepareForAOT(RootNode)
may be
used to prepare a root node in RootNode.prepareForAOT()
.
This annotation can also be used for classes annotated with Truffle library declarations and
exports. The same rules, as described here, for specializations declared in exported libraries
apply. Multiple AOT exports may be specified for each library, but there must be at least one,
otherwise an IllegalStateException
is thrown at runtime when AOT is prepared.
See also the usage tutorial on the website.
RootNode.prepareForAOT()