Class AbstractIRMethod

java.lang.Object
org.jruby.internal.runtime.methods.DynamicMethod
org.jruby.internal.runtime.AbstractIRMethod
All Implemented Interfaces:
Cloneable, IRMethodArgs, PositionAware
Direct Known Subclasses:
CompiledIRMethod, CompiledIRNoProtocolMethod, InterpretedIRMethod, MixedModeIRMethod

public abstract class AbstractIRMethod extends DynamicMethod implements IRMethodArgs, PositionAware, Cloneable
  • Field Details Link icon

    • signature Link icon

      protected final Signature signature
    • method Link icon

      protected IRScope method
    • line Link icon

      protected final int line
    • staticScope Link icon

      protected final StaticScope staticScope
    • callCount Link icon

      protected int callCount
    • interpreterContext Link icon

      protected transient InterpreterContext interpreterContext
  • Constructor Details Link icon

  • Method Details Link icon

    • tryJit Link icon

      protected static <T extends AbstractIRMethod & Compilable> void tryJit(ThreadContext context, T self, boolean force)
    • build Link icon

      protected static <T extends AbstractIRMethod & Compilable> void build(ThreadContext context, T self, boolean force)
    • setCallCount Link icon

      public final void setCallCount(int callCount)
    • isBuildComplete Link icon

      public boolean isBuildComplete()
    • getIRScope Link icon

      public IRScope getIRScope()
    • getStaticScope Link icon

      public StaticScope getStaticScope()
    • getArgumentDescriptors Link icon

      public ArgumentDescriptor[] getArgumentDescriptors()
      Description copied from interface: IRMethodArgs
      Get the array of ArgumentDescriptors that represent the arguments to this method.
      Specified by:
      getArgumentDescriptors in interface IRMethodArgs
      Returns:
      this methods argument descriptors
    • ensureInstrsReady Link icon

      public InterpreterContext ensureInstrsReady()
    • printMethodIR Link icon

      protected abstract void printMethodIR()
    • getSignature Link icon

      public Signature getSignature()
      Description copied from class: DynamicMethod
      Retrieve the signature of this method.
      Specified by:
      getSignature in interface IRMethodArgs
      Overrides:
      getSignature in class DynamicMethod
      Returns:
      the signature
    • getArity Link icon

      @Deprecated public Arity getArity()
      Deprecated.
      Description copied from class: DynamicMethod
      Retrieve the arity of this method, used for reporting arity to Ruby code. This arity may or may not reflect the actual specific or variable arities of the referenced method.
      Overrides:
      getArity in class DynamicMethod
      Returns:
      The arity of the method, as reported to Ruby consumers.
    • dup Link icon

      public DynamicMethod dup()
      Description copied from class: DynamicMethod
      Duplicate this method, returning DynamicMethod referencing the same code and with the same attributes. It is not required that this method produce a new object if the semantics of the DynamicMethod subtype do not require such.
      Specified by:
      dup in class DynamicMethod
      Returns:
      An identical DynamicMethod object to the target.
    • clone Link icon

      public Object clone()
      Overrides:
      clone in class Object
    • getFile Link icon

      public String getFile()
      Description copied from interface: PositionAware
      Get the filename for the method.
      Specified by:
      getFile in interface PositionAware
      Returns:
      the filename for the method
    • getLine Link icon

      public int getLine()
      Description copied from interface: PositionAware
      Get the line number for the method. 0-based (ie. line 1 returns a 0)
      Specified by:
      getLine in interface PositionAware
      Returns:
      the line number for the method
    • getMethodData Link icon

      public MethodData getMethodData()
      Additional metadata about this method.
      Overrides:
      getMethodData in class DynamicMethod
      Returns:
      method data (defined in sub classes)
    • getInstanceVariableNames Link icon

      public Collection<String> getInstanceVariableNames()
      Overrides:
      getInstanceVariableNames in class DynamicMethod
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • needsToFindImplementer Link icon

      public boolean needsToFindImplementer()
    • setRuby2Keywords Link icon

      public void setRuby2Keywords()
      Description copied from class: DynamicMethod
      Indicates the method will behave like a ruby2 keywords accepting method. This must be a Ruby implementation to work. See Module#ruby2_keywords for information on the semantics of a method which is marked this way.
      Specified by:
      setRuby2Keywords in interface IRMethodArgs
      Overrides:
      setRuby2Keywords in class DynamicMethod
    • getRuby2Keywords Link icon

      public boolean getRuby2Keywords()
    • startSplitSuperCall Link icon

      public abstract SplitSuperState startSplitSuperCall(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args, Block block)
    • finishSplitCall Link icon

      public abstract void finishSplitCall(SplitSuperState state)