Package com.oracle.truffle.api.dsl
package com.oracle.truffle.api.dsl
Domain specific language that allows to specify specializing AST nodes in a declarative way. Uses
annotation processor to generate the necessary subclass.
- Since:
- 0.8 or older
-
ClassDescriptionHelper class to prepare AOT enabled nodes for AOT in
RootNode.prepareForAOT()
.Binds and executes an expression at most once for every execution of the node.Defines a default bind expression for a given type.A parameter annotated withCached
in aSpecialization
refers to a cached value of a specialization instance.Disallows any sharing with other cached parameters.Allows sharing between multiple Cached parameters between multiple specializations or exported library messages.Specifies a factory method that creates aNode
which is used to cast this child.APIs to support share code in generated code.Interface implemented by specialization data classes.This annotation declares achild
field to be executed and used as dynamic input values forspecializations
.Allows tracing of calls toexecute
methods of aNode
.A method annotated withFallback
is treated as aSpecialization
that implicitly links all the guards of all other declaredSpecialization
annotated methods of the operation in a negated form.Allows nodes with specializations to be prepared for AOT.Excludes the annotatedSpecialization
from AOT preparation.Implemented by generated code.Allows to enable or disable the generation of the cached version of a Truffle DSL node.Marks a type as being generated based on another class or method of a class.Generates code for a node that makes this node inlinable when used incached
parameters ofspecializations
.Annotate nodes or base classes of nodes to generate factory handlers implementing theNodeFactory
interface.Make the code generated for an annotatednode
package-private.Generates an uncached version of a node with specializations.Methods annotated withIdempotent
must be methods that may cause side effects but will always cause the same side effects for repeated invocations with the same parameters.Marks an implicit cast method.Imports allpublic
andstatic
methods and fields of the provided classes for the use in DSL expressions of the annotated class or its subclasses.Contains classes to support node object inlining in Truffle.Represents a field for boolean primitives in inlined nodes.Represents a field for byte primitives in inlined nodes.Represents a field for char primitives in inlined nodes.Represents a field for double primitives in inlined nodes.Represents a field for float primitives in inlined nodes.Base class for inlined field references.An inline targert for an inlinable node.Represents a field for int primitives in inlined nodes.Represents a field for long primitives in inlined nodes.Represents a field for references in inlined nodes.Used to specify fields for node object inlining in inline methods for theinline target
.Used to specify multipleInlineSupport.RequiredField
.Represents a field for short primitives in inlined nodes.Represents a field for updating state fields in inlined nodes.Marks a field to be accessed with unsafe.Annotate a DSL operation using this annotation to be introspectable.Contains introspection utilities for Truffle DSL.Internal marker interface for DSL generated code to access reflection information.Represents dynamic introspection information of a specialization of a DSL operation.Useful to annotate methods, fields or parameters bound by any DSL expression to indicate that it never returns anull
or default primitive value.NodeFactory<T>Enables the dynamic creation of generated nodes.ANodeFields
element defines a field for the generatedNode
.Methods annotated withNonIdempotent
must be methods that may cause side effects but may not always cause the same side effects for repeated invocations with the same parameters.Enables reporting of polymorphic specializations from this node or exported message to the runtime.Nodes (and their subclasses) or specializations annotated with this annotation will be excluded from consideration whenreporting polymorphic specializations
.Specializations annotated with this annotation are considered megamorphic.Defines a method of a node subclass to represent one specialization of an operation.Represents a specialization statistics utiltiy that can beentered
to collect additional statistics about Truffle DSL nodes.Used on nodes to always enable specialization statistics.Class to collect statistics information per node.Use to suppress Truffle DSL warnings in whole packages using a package-info.java class.Overrides the standard way of casting a certain type in aTypeSystem
.Overrides the standard way of checking for a certain type in aTypeSystem
.Type guards are the most common form of guards used in Truffle languages.References aTypeSystem
on a node.Thrown by the generated code of Truffle-DSL if no compatible Specialization could be found for the provided values.