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
-
Field Summary
Fields inherited from class org.jruby.ir.IRScope
compilable, fullInterpreterContext, interpreterContext, LOG, nextClosureIndex, optimizedInterpreterContext -
Constructor Summary
ConstructorsConstructorDescriptionIRModuleBody(IRManager manager, IRScope lexicalParent, ByteList name, int lineNumber, StaticScope staticScope, boolean executesOnce) -
Method Summary
Modifier and TypeMethodDescriptionvoidWe are done with execution of this scope and we can cleanup some amount of things in this scope which will no longer be used.booleanintReturns the nearest scope which we can extract a live module from.booleanDoes this scope represent a module body?Methods inherited from class org.jruby.ir.IRScope
accessesParentsLocalVariables, addChildScope, addClosure, allocateInitialFlags, allocateInterpreterContext, allocateInterpreterContext, anyUsesEval, buildJVMExceptionTable, builtInterpreterContext, canCaptureCallersBinding, canReceiveBreaks, canReceiveNonlocalReturns, captureParentRefinements, correctVariableDepthForForLoopsForEncoding, debugOutput, depends, dumpToIGV, equals, findExistingLocalVariable, getAST, getByteName, getClosures, getCoverageMode, getDynamicScope, getEncoding, getExecutedPasses, getExecutionContext, getFile, getFileName, getFullInterpreterContext, getFullyQualifiedName, getId, getInterpreterContext, getLexicalParent, getLexicalScopes, getLine, getLineNumber, getLocalVariable, getLocalVariables, getManager, getName, getNearestMethod, getNearestNonClosurelikeScope, getNearestTopLocalVariableScope, getNewLabel, getNewLabel, getNewLocalVariable, getNextClosureId, getNextLabelIndex, getOptimizedInterpreterContext, getRootLexicalScope, getScopeId, getSelf, getStaticScope, hasBeenBuilt, hasBreakInstructions, hasFlipFlops, hashCode, hasLoops, hasNonLocalReturns, inlineMethod, inlineMethodCompiled, inlineMethodJIT, inliningAllowed, isNestedInClosure, isNonSingletonClassBody, isRuby2Keywords, isScopeContainedBy, isScriptScope, isTopLocalVariableScope, isWhereFlipFlopStateVariableIs, isWithinEND, lookupExistingLVar, maybeUsingRefinements, needsCodeCoverage, parentMaybeUsingRefinements, persistScopeFlags, persistScopeHeader, prepareForCompilation, prepareFullBuild, receivesClosureArg, receivesKeywordArgs, removeClosure, setAccessesParentsLocalVariables, setByteName, setCanCaptureCallersBinding, setCanReceiveBreaks, setCanReceiveNonlocalReturns, setCoverageMode, setFileName, setHasBreakInstructions, setHasFlipFlops, setHasLoops, setHasNonLocalReturns, setIsMaybeUsingRefinements, setNeedsCodeCoverage, setNextLabelIndex, setReceivesClosureArg, setReceivesKeywordArgs, setRuby2Keywords, setUsesEval, setUsesSuper, setUsesZSuper, toString, toStringCompileForm, toStringInstrs, usesEval, usesSuper, usesZSuper
-
Constructor Details
-
IRModuleBody
public IRModuleBody(IRManager manager, IRScope lexicalParent, ByteList name, int lineNumber, StaticScope staticScope, boolean executesOnce)
-
-
Method Details
-
getNearestModuleReferencingScopeDepth
public int getNearestModuleReferencingScopeDepth()Description copied from class:IRScopeReturns 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:
getNearestModuleReferencingScopeDepthin classIRScope
-
getScopeType
- Specified by:
getScopeTypein classIRScope
-
isModuleBody
public boolean isModuleBody()Description copied from class:IRScopeDoes this scope represent a module body?- Overrides:
isModuleBodyin classIRScope
-
cleanupAfterExecution
public void cleanupAfterExecution()Description copied from class:IRScopeWe 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:
cleanupAfterExecutionin classIRScope
-
executesOnce
public boolean executesOnce()- Overrides:
executesOncein classIRScope
-