@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
TestNodethe generated node will be called
TestNodeGen. Any node where generated cached is enabled will contain a
This annotation is useful if only an
inlinable version of the node should be generated. It also allows to disable code generation for
nodes with specializations that should not generate code.
|Modifier and Type||Optional Element and Description|
public abstract boolean value
trueenables the generation of a cached version of this
specializingnode. It is enabled by default.
public abstract boolean inherit
trueenables inheritance of
GenerateCached.alwaysInlineCached()to subclasses. It is
public abstract boolean alwaysInlineCached
inlinablenode 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
GenerateInlinethey must always inline their cached values, as they are otherwise themselves not inlinable.