Package org.jruby.ir

Class IRModuleBody

java.lang.Object
org.jruby.ir.IRScope
org.jruby.ir.IRModuleBody
All Implemented Interfaces:
ParseResult
Direct Known Subclasses:
IRClassBody

public class IRModuleBody extends IRScope
  • Constructor Details

  • Method Details

    • 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
    • isModuleBody

      public boolean isModuleBody()
      Description copied from class: IRScope
      Does this scope represent a module body?
      Overrides:
      isModuleBody 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
    • executesOnce

      public boolean executesOnce()
      Overrides:
      executesOnce in class IRScope