Top Fields Constructors Methods
org.jruby.ir

public Class IRModuleBody

extends IRScope
Class Inheritance
Known Direct Subclasses
org.jruby.ir.IRClassBody
Imports
org.jruby.parser.StaticScope, org.jruby.util.ByteList

Field Summary

Modifier and TypeField and Description
private final boolean
Inherited from org.jruby.ir.IRScope:
compilablefullInterpreterContextinterpreterContextlocalVarsLOGnextClosureIndexoptimizedInterpreterContext

Constructor Summary

AccessConstructor and Description
public
IRModuleBody(IRManager manager, IRScope lexicalParent, ByteList name, int lineNumber, StaticScope staticScope, boolean executesOnce)

Method Summary

Modifier and TypeMethod and Description
public void
cleanupAfterExecution()

Overrides org.jruby.ir.IRScope.cleanupAfterExecution.

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.

public boolean
public int
getNearestModuleReferencingScopeDepth()

Overrides org.jruby.ir.IRScope.getNearestModuleReferencingScopeDepth.

Returns the nearest scope which we can extract a live module from.

public IRScopeType
public boolean
isModuleBody()

Overrides org.jruby.ir.IRScope.isModuleBody.

Does this scope represent a module body?

Inherited from org.jruby.ir.IRScope:
accessesParentsLocalVariablesaddChildScopeaddClosureallocateInitialFlagsallocateInterpreterContextallocateInterpreterContextanyUsesEvalbuildJVMExceptionTablebuiltInterpreterContextcanCaptureCallersBindingcanReceiveBreakscanReceiveNonlocalReturnscaptureParentRefinementscorrectVariableDepthForForLoopsForEncodingdebugOutputdependsdumpToIGVequalsfindExistingLocalVariablegetASTgetByteNamegetClosuresgetCoverageModegetDynamicScopegetEncodinggetExecutedPassesgetExecutionContextgetFilegetFileNamegetFullInterpreterContextgetFullyQualifiedNamegetIdgetInterpreterContextgetLexicalParentgetLexicalScopesgetLinegetLineNumbergetLocalVariablegetLocalVariablesgetManagergetNamegetNearestMethodgetNearestNonClosurelikeScopegetNearestTopLocalVariableScopegetNewLabelgetNewLabelgetNewLocalVariablegetNextClosureIdgetNextLabelIndexgetOptimizedInterpreterContextgetRootLexicalScopegetScopeIdgetSelfgetStaticScopehasBeenBuilthasBreakInstructionshasFlipFlopshashCodehasLoopshasNonLocalReturnsinlineMethodinlineMethodCompiledinlineMethodJITinliningAllowedisNestedInClosureisNonSingletonClassBodyisRuby2KeywordsisScopeContainedByisScriptScopeisTopLocalVariableScopeisWhereFlipFlopStateVariableIsisWithinENDlookupExistingLVarmaybeUsingRefinementsneedsCodeCoverageparentMaybeUsingRefinementspersistScopeFlagspersistScopeHeaderprepareForCompilationprepareFullBuildreceivesClosureArgreceivesKeywordArgsremoveClosuresetAccessesParentsLocalVariablessetByteNamesetCanCaptureCallersBindingsetCanReceiveBreakssetCanReceiveNonlocalReturnssetCoverageModesetFileNamesetHasBreakInstructionssetHasFlipFlopssetHasLoopssetHasNonLocalReturnssetIsMaybeUsingRefinementssetNeedsCodeCoveragesetNextLabelIndexsetReceivesClosureArgsetReceivesKeywordArgssetRuby2KeywordssetUsesEvalsetUsesSupersetUsesZSupertoStringtoStringCompileFormtoStringInstrsusesEvalusesSuperusesZSuper

Field Detail

executesOnceback to summary
private final boolean executesOnce

Constructor Detail

IRModuleBodyback to summary
public IRModuleBody(IRManager manager, IRScope lexicalParent, ByteList name, int lineNumber, StaticScope staticScope, boolean executesOnce)

Method Detail

cleanupAfterExecutionback to summary
public void cleanupAfterExecution()

Overrides org.jruby.ir.IRScope.cleanupAfterExecution.

Doc from org.jruby.ir.IRScope.cleanupAfterExecution.

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.

Annotations
@Override
executesOnceback to summary
public boolean executesOnce()

Overrides org.jruby.ir.IRScope.executesOnce.

getNearestModuleReferencingScopeDepthback to summary
public int getNearestModuleReferencingScopeDepth()

Overrides org.jruby.ir.IRScope.getNearestModuleReferencingScopeDepth.

Doc from org.jruby.ir.IRScope.getNearestModuleReferencingScopeDepth.

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.

Annotations
@Override
getScopeTypeback to summary
public IRScopeType getScopeType()

Implements abstract org.jruby.ir.IRScope.getScopeType.

Annotations
@Override
isModuleBodyback to summary
public boolean isModuleBody()

Overrides org.jruby.ir.IRScope.isModuleBody.

Doc from org.jruby.ir.IRScope.isModuleBody.

Does this scope represent a module body?

Annotations
@Override