Package com.oracle.truffle.sl.runtime
Class SLFunctionRegistry
java.lang.Object
com.oracle.truffle.sl.runtime.SLFunctionRegistry
Manages the mapping from function names to
function objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFunction(com.oracle.truffle.api.strings.TruffleString name) Returns the sorted list of all functions, for printing purposes only.com.oracle.truffle.api.interop.TruffleObjectlookup(com.oracle.truffle.api.strings.TruffleString name, boolean createIfNotPresent) Returns the canonicalSLFunctionobject for the given name.voidregister(com.oracle.truffle.api.source.Source newFunctions) voidregister(Map<com.oracle.truffle.api.strings.TruffleString, com.oracle.truffle.api.RootCallTarget> newFunctions) Registers a map of functions.
-
Constructor Details
-
SLFunctionRegistry
-
-
Method Details
-
lookup
public SLFunction lookup(com.oracle.truffle.api.strings.TruffleString name, boolean createIfNotPresent) Returns the canonicalSLFunctionobject for the given name. If it does not exist yet, it is created. -
register
public void register(Map<com.oracle.truffle.api.strings.TruffleString, com.oracle.truffle.api.RootCallTarget> newFunctions) Registers a map of functions. The once registered map must not change in order to allow to cache the registration for the entire map. If the map is changed after registration the functions might not get registered. -
register
public void register(com.oracle.truffle.api.source.Source newFunctions) -
getFunction
-
getFunctions
Returns the sorted list of all functions, for printing purposes only. -
getFunctionsObject
public com.oracle.truffle.api.interop.TruffleObject getFunctionsObject()
-