Package org.jruby.ir

Class IRMethod

java.lang.Object
org.jruby.ir.IRScope
org.jruby.ir.IRMethod
All Implemented Interfaces:
ParseResult

public class IRMethod extends IRScope
  • Field Details

    • isInstanceMethod

      public final boolean isInstanceMethod
    • argDesc

      protected ArgumentDescriptor[] argDesc
  • Constructor Details

  • Method Details

    • hasBeenBuilt

      public boolean hasBeenBuilt()
      Description copied from class: IRScope
      For lazy scopes which IRBuild on demand we can ask this method whether it has been built yet...
      Overrides:
      hasBeenBuilt in class IRScope
    • getMethodData

      public MethodData getMethodData()
    • builtInterpreterContext

      public InterpreterContext builtInterpreterContext()
      Overrides:
      builtInterpreterContext in class IRScope
    • builtInterpreterContextForJavaConstructor

      public ExitableInterpreterContext builtInterpreterContextForJavaConstructor()
      initialize methods in reified Java types will try and dispatch to the Java base classes constructor when the Ruby in the initialize: a) The super call is still valid in terms of Java (e.g. you cannot access self/this before the super call b) We can detect the validity of 'a'. Limitations like super in all paths of branches is not supported (for now). In cases where no super exists or it is unsupported we will return a normal interpreter (and a warning when unsupported):
      Returns:
      appropriate interpretercontext
    • builtInterperterContextForJavaConstructor

      @Deprecated public ExitableInterpreterContext builtInterperterContextForJavaConstructor()
      Deprecated.
      This method was renamed (due a typo).
      See Also:
    • lazilyAcquireInterpreterContext

      public final InterpreterContext lazilyAcquireInterpreterContext()
    • prepareForCompilation

      public BasicBlock[] prepareForCompilation()
      Description copied from class: IRScope
      Run any necessary passes to get the IR ready for compilation (AOT and/or JIT)
      Overrides:
      prepareForCompilation in class IRScope
    • getScopeType

      public IRScopeType getScopeType()
      Specified by:
      getScopeType in class IRScope
    • findExistingLocalVariable

      protected LocalVariable findExistingLocalVariable(RubySymbol name, int scopeDepth)
      Overrides:
      findExistingLocalVariable in class IRScope
    • getLocalVariable

      public LocalVariable getLocalVariable(RubySymbol name, int scopeDepth)
      Description copied from class: IRScope
      Find or create a local variable. By default, scopes are assumed to only check current depth. Blocks/Closures override this because they have special nesting rules.
      Overrides:
      getLocalVariable in class IRScope
    • getArgumentDescriptors

      public ArgumentDescriptor[] getArgumentDescriptors()
    • setArgumentDescriptors

      public void setArgumentDescriptors(ArgumentDescriptor[] argDesc)
      Set upon completion of IRBuild of this IRMethod.