public final class SLFunctionRegistry extends Object
function objects.| Constructor and Description |
|---|
SLFunctionRegistry(SLLanguage language) |
| Modifier and Type | Method and Description |
|---|---|
SLFunction |
getFunction(com.oracle.truffle.api.strings.TruffleString name) |
List<SLFunction> |
getFunctions()
Returns the sorted list of all functions, for printing purposes only.
|
com.oracle.truffle.api.interop.TruffleObject |
getFunctionsObject() |
SLFunction |
lookup(com.oracle.truffle.api.strings.TruffleString name,
boolean createIfNotPresent)
Returns the canonical
SLFunction object for the given name. |
void |
register(Map<com.oracle.truffle.api.strings.TruffleString,com.oracle.truffle.api.RootCallTarget> newFunctions)
Registers a map of functions.
|
void |
register(com.oracle.truffle.api.source.Source newFunctions) |
public SLFunctionRegistry(SLLanguage language)
public SLFunction lookup(com.oracle.truffle.api.strings.TruffleString name, boolean createIfNotPresent)
SLFunction object for the given name. If it does not exist yet,
it is created.public void register(Map<com.oracle.truffle.api.strings.TruffleString,com.oracle.truffle.api.RootCallTarget> newFunctions)
public void register(com.oracle.truffle.api.source.Source newFunctions)
public SLFunction getFunction(com.oracle.truffle.api.strings.TruffleString name)
public List<SLFunction> getFunctions()
public com.oracle.truffle.api.interop.TruffleObject getFunctionsObject()