Class SLType
- All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject
The isInstance type checks are declared using an functional interface and are expressed using the interoperability libraries. The advantage of this is type checks automatically work for foreign values or primitive values like byte or short.
The class implements the interop contracts for InteropLibrary.isMetaObject(Object) and
InteropLibrary.isMetaInstance(Object, Object). The latter allows other languages and
tools to perform type checks using types of simple language.
In order to assign types to guest language values, SL values implement
InteropLibrary.getMetaObject(Object). The interop contracts for primitive values cannot
be overriden, so in order to assign meta-objects to primitive values, the primitive values are
assigned using language views. See SLLanguage.getLanguageView(com.oracle.truffle.sl.runtime.SLContext, java.lang.Object).
-
Field Summary
Fields -
Method Summary