Package com.oracle.truffle.sl.nodes
Class SLTypes
java.lang.Object
com.oracle.truffle.sl.nodes.SLTypes
The type system of SL, as explained in
SLLanguage. Based on the TypeSystem
annotation, the Truffle DSL generates the subclass SLTypesGen with type test and type
conversion methods for some types. In this class, we only cover types where the automatically
generated ones would not be sufficient.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SLNullExample of a manually specified type cast that replaces the automatically generated type cast that the Truffle DSL would generate.static SLBigIntegercastBigNumber(long value) Informs the Truffle DSL that a primitivelongvalue can be used in all specializations where aSLBigIntegeris expected.static booleanExample of a manually specified type check that replaces the automatically generated type check that the Truffle DSL would generate.
-
Constructor Details
-
SLTypes
public SLTypes()
-
-
Method Details
-
isSLNull
-
asSLNull
-
castBigNumber
Informs the Truffle DSL that a primitivelongvalue can be used in all specializations where aSLBigIntegeris expected. This models the semantic of SL: It only has an arbitrary precision Number type (implemented asSLBigInteger, andlongis only used as a performance optimization to avoid the costlySLBigIntegerarithmetic for values that fit into a 64-bit primitive value.
-