Class SLFunctionRegistry

java.lang.Object
com.oracle.truffle.sl.runtime.SLFunctionRegistry

public final class SLFunctionRegistry extends Object
Manages the mapping from function names to function objects.
  • Constructor Details

    • SLFunctionRegistry

      public SLFunctionRegistry(SLLanguage language)
  • Method Details

    • lookup

      public SLFunction lookup(com.oracle.truffle.api.strings.TruffleString name, boolean createIfNotPresent)
      Returns the canonical SLFunction object 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

      public SLFunction getFunction(com.oracle.truffle.api.strings.TruffleString name)
    • getFunctions

      public List<SLFunction> getFunctions()
      Returns the sorted list of all functions, for printing purposes only.
    • getFunctionsObject

      public com.oracle.truffle.api.interop.TruffleObject getFunctionsObject()