Skip navigation links

Package com.oracle.truffle.api.object.dsl

Domain specific language for using the Truffle dynamic object storage model to create classic class hierarchies.

See: Description

Package com.oracle.truffle.api.object.dsl Description

Domain specific language for using the Truffle dynamic object storage model to create classic class hierarchies.

The dynamic object storage model (com.oracle.truffle.api.object) is well suited to supporting dynamic object models such as those found in Ruby and JavaScript. This domain specific language makes it easier to also use the object storage model when you know at the time you are writing your language what properties you will need, you want to be able to specify that declaratively, and you want to be able to access the properties of the objects efficiently without creating many nodes to do that.

A typical use-case of the object storage model DSL is to implement language built-in classes which need internal implementation properties, as well as dynamic properties set by the language user. Using the object storage model DSL allows the object storage model to be conveniently used for both of these with just the one DynamicObject instance, while providing an interface that is similar to if you were defining normal Java fields in a separate object.

The object storage model DSL is used by creating interfaces annotated with Layout.

Since:
0.8 or older
See Also:
Layout
Skip navigation links