Package org.jruby.ir

Class IRScriptBody

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

public class IRScriptBody extends IRScope
  • Constructor Details

  • Method Details

    • getScriptDynamicScope

      public DynamicScope getScriptDynamicScope()
    • setScriptDynamicScope

      public void setScriptDynamicScope(DynamicScope tlbScope)
    • getNearestModuleReferencingScopeDepth

      public int getNearestModuleReferencingScopeDepth()
      Description copied from class: IRScope
      Returns the nearest scope which we can extract a live module from. If this returns null (like for evals), then it means it cannot be statically determined.
      Overrides:
      getNearestModuleReferencingScopeDepth in class IRScope
    • getScopeType

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

      public String toString()
      Overrides:
      toString in class IRScope
    • isScriptScope

      public boolean isScriptScope()
      Description copied from class: IRScope
      Is this an eval script or a regular file script?
      Overrides:
      isScriptScope in class IRScope
    • setFileName

      public void setFileName(String fileName)
      Overrides:
      setFileName in class IRScope
    • getFile

      public String getFile()
      Specified by:
      getFile in interface ParseResult
      Overrides:
      getFile in class IRScope
    • getId

      public String getId()
      Overrides:
      getId in class IRScope
    • getName

      public RubySymbol getName()
      Overrides:
      getName in class IRScope
    • cleanupAfterExecution

      public void cleanupAfterExecution()
      Description copied from class: IRScope
      We are done with execution of this scope and we can cleanup some amount of things in this scope which will no longer be used. Sub-classes will be the deciders of what is no longer needed. An example, to illustrate the complexity of cleanup: A class with no nested closures can remove any ICs created and can remove some other infomrational data structures like allocated variables unless closures do exist and then the ICs must stay for when closures JIT.
      Overrides:
      cleanupAfterExecution in class IRScope