@Retention(value=CLASS) @Target(value=TYPE) public @interface GenerateCached
specialization methods. The cached version of a node is accessed through a generated class that
is named with the suffix Gen of the source node. For example if the node containing
specializations is named TestNode the generated node will be called
TestNodeGen. Any node where generated cached is enabled will contain a
create method.
This annotation is useful if only an uncached or inlinable version of the node should be generated. It also allows to disable code generation for
abstract nodes with specializations that should not generate code.
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
alwaysInlineCached
|
boolean |
inherit
If
true enables inheritance of GenerateCached.value() and
GenerateCached.alwaysInlineCached() to subclasses. |
boolean |
value
If
true enables the generation of a cached version of this specializing node. |
public abstract boolean value
true enables the generation of a cached version of this specializing node. It is enabled by default.public abstract boolean inherit
true enables inheritance of GenerateCached.value() and
GenerateCached.alwaysInlineCached() to subclasses. It is false by default.public abstract boolean alwaysInlineCached
cached inlinable node is inlined
by default. By default a warning is emitted if the inline flag is not enabled explicitly.
This is not necessary for nodes annotated with GenerateInline they must always inline
their cached values, as they are otherwise themselves not inlinable.