Top Fields Constructors Methods
org.jruby.ir

public Class IRScriptBody

extends IRScope
Class Inheritance
Imports
org.jruby.RubySymbol, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope

Field Summary

Modifier and TypeField and Description
private String
private DynamicScope
Inherited from org.jruby.ir.IRScope:
compilablefullInterpreterContextinterpreterContextlocalVarsLOGnextClosureIndexoptimizedInterpreterContext

Constructor Summary

AccessConstructor and Description
public
IRScriptBody(IRManager manager, String sourceName, StaticScope staticScope)

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 String
public String
public RubySymbol
public int
getNearestModuleReferencingScopeDepth()

Overrides org.jruby.ir.IRScope.getNearestModuleReferencingScopeDepth.

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

public IRScopeType
public DynamicScope
public boolean
isScriptScope()

Overrides org.jruby.ir.IRScope.isScriptScope.

Is this an eval script or a regular file script?

public void
public void
public String
toString()

Overrides org.jruby.ir.IRScope.toString.

Returns a string representation of the object.

Inherited from org.jruby.ir.IRScope:
accessesParentsLocalVariablesaddChildScopeaddClosureallocateInitialFlagsallocateInterpreterContextallocateInterpreterContextanyUsesEvalbuildJVMExceptionTablebuiltInterpreterContextcanCaptureCallersBindingcanReceiveBreakscanReceiveNonlocalReturnscaptureParentRefinementscorrectVariableDepthForForLoopsForEncodingdebugOutputdependsdumpToIGVequalsexecutesOncefindExistingLocalVariablegetASTgetByteNamegetClosuresgetCoverageModegetDynamicScopegetEncodinggetExecutedPassesgetExecutionContextgetFileNamegetFullInterpreterContextgetFullyQualifiedNamegetInterpreterContextgetLexicalParentgetLexicalScopesgetLinegetLineNumbergetLocalVariablegetLocalVariablesgetManagergetNearestMethodgetNearestNonClosurelikeScopegetNearestTopLocalVariableScopegetNewLabelgetNewLabelgetNewLocalVariablegetNextClosureIdgetNextLabelIndexgetOptimizedInterpreterContextgetRootLexicalScopegetScopeIdgetSelfgetStaticScopehasBeenBuilthasBreakInstructionshasFlipFlopshashCodehasLoopshasNonLocalReturnsinlineMethodinlineMethodCompiledinlineMethodJITinliningAllowedisModuleBodyisNestedInClosureisNonSingletonClassBodyisRuby2KeywordsisScopeContainedByisTopLocalVariableScopeisWhereFlipFlopStateVariableIsisWithinENDlookupExistingLVarmaybeUsingRefinementsneedsCodeCoverageparentMaybeUsingRefinementspersistScopeFlagspersistScopeHeaderprepareForCompilationprepareFullBuildreceivesClosureArgreceivesKeywordArgsremoveClosuresetAccessesParentsLocalVariablessetByteNamesetCanCaptureCallersBindingsetCanReceiveBreakssetCanReceiveNonlocalReturnssetCoverageModesetHasBreakInstructionssetHasFlipFlopssetHasLoopssetHasNonLocalReturnssetIsMaybeUsingRefinementssetNeedsCodeCoveragesetNextLabelIndexsetReceivesClosureArgsetReceivesKeywordArgssetRuby2KeywordssetUsesEvalsetUsesSupersetUsesZSupertoStringCompileFormtoStringInstrsusesEvalusesSuperusesZSuper

Field Detail

fileNameback to summary
private String fileName
toplevelScopeback to summary
private DynamicScope toplevelScope

Constructor Detail

IRScriptBodyback to summary
public IRScriptBody(IRManager manager, String sourceName, StaticScope staticScope)

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
getFileback to summary
public String getFile()

Overrides org.jruby.ir.IRScope.getFile.

Implements org.jruby.ParseResult.getFile.

getIdback to summary
public String getId()

Overrides org.jruby.ir.IRScope.getId.

getNameback to summary
public RubySymbol getName()

Overrides org.jruby.ir.IRScope.getName.

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
getScriptDynamicScopeback to summary
public DynamicScope getScriptDynamicScope()
isScriptScopeback to summary
public boolean isScriptScope()

Overrides org.jruby.ir.IRScope.isScriptScope.

Doc from org.jruby.ir.IRScope.isScriptScope.

Is this an eval script or a regular file script?

Annotations
@Override
setFileNameback to summary
public void setFileName(String fileName)

Overrides org.jruby.ir.IRScope.setFileName.

Annotations
@Override
setScriptDynamicScopeback to summary
public void setScriptDynamicScope(DynamicScope tlbScope)
toStringback to summary
public String toString()

Overrides org.jruby.ir.IRScope.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override