Interface Compilable<T>

Type Parameters:
T - result value to compile
All Known Implementing Classes:
CompiledIRMethod, DefineMethodMethod, InterpretedIRBlockBody, InterpretedIRBodyMethod, InterpretedIRMethod, MixedModeIRBlockBody, MixedModeIRMethod

public interface Compilable<T>
Blocks and methods both share same full build mechanism so they implement this to be buildable.
  • Method Details

    • setCallCount

      void setCallCount(int count)
    • completeBuild

      @Deprecated(since="10.0") default void completeBuild(T buildResult)
      Deprecated.
    • completeBuild

      default void completeBuild(ThreadContext context, T buildResult)
    • forceBuild

      default boolean forceBuild(ThreadContext context)
      Force this Compilable to finish its build process. Override this and isBuildComplete() for implementations that have a build process.
      Parameters:
      context - the current thread context
      Returns:
      true if the forced build completed; false otherwise
    • isBuildComplete

      default boolean isBuildComplete()
      Indicates whether this Compilable has completed its build process. Override this and forceBuild(ThreadContext) for implementations that have a build process.
      Returns:
      true if the build has completed; false otherwise.
    • getIRScope

      IRScope getIRScope()
    • ensureInstrsReady

      InterpreterContext ensureInstrsReady()
    • getOwnerName

      @Deprecated(since="10.0") default String getOwnerName()
      Deprecated.
      Return the owning module/class name.
      Returns:
      method/block owner's name
    • getOwnerName

      default String getOwnerName(ThreadContext context)
    • getName

      String getName()
      Returns:
      method/closure identifier
    • getFile

      String getFile()
      Returns:
      method/block source file
    • getLine

      int getLine()
      Returns:
      method/block source file line
    • getImplementationClass

      RubyModule getImplementationClass()
    • getClassName

      @Deprecated default String getClassName(ThreadContext context)
      Deprecated.
    • resolveFullName

      static String resolveFullName(ThreadContext context, RubyModule implementationClass)
      Resolve the fully qualified name.
      Parameters:
      implementationClass -
      Returns:
      class/module name e.g. Foo::Bar::Baz