Represents a 'for' loop
| constant | type | note |
|---|---|---|
| _BEGIN_ | ByteList |
<init>(org.jruby.ir.IRManager manager, org.jruby.ir.IRScope lexicalParent, int lineNumber, org.jruby.parser.StaticScope staticScope, org.jruby.runtime.Signature signature, org.jruby.util.ByteList labelPrefix)<init>(org.jruby.ir.IRManager manager, org.jruby.ir.IRScope lexicalParent, int lineNumber, org.jruby.parser.StaticScope staticScope, org.jruby.runtime.Signature signature)| field | type | note |
|---|---|---|
| LOG | Logger | |
| compilable | Compilable |
accessesParentsLocalVariables()anyUsesEval()getAST() · also: get_astbuildJVMExceptionTable(org.jruby.ir.interpreter.FullInterpreterContext fic)canCaptureCallersBinding()canReceiveBreaks()canReceiveNonlocalReturns()captureParentRefinements(org.jruby.runtime.ThreadContext context)Duplicate the parent scope's refinements overlay to get a moment-in-time snapshot.
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.
correctVariableDepthForForLoopsForEncoding(int depth)getCoverageMode() · also: get_coverage_modesetCoverageMode(int coverageMode) · also: set_coverage_modedebugOutput()getEncoding() · also: get_encodingequals(Object other)executesOnce()getExecutionContext() · also: get_execution_contextgetFile() · also: get_filesetFileName(String filename) · also: set_file_namegetFullInterpreterContext() · also: get_full_interpreter_contextgetFullyQualifiedName() · also: get_fully_qualified_namehasBeenBuilt() · also: has_been_builtFor lazy scopes which IRBuild on demand we can ask this method whether it has been built yet...
hasBreakInstructions() · also: has_break_instructionssetHasFlipFlops(boolean hasFlipFlops) · also: set_has_flip_flopshasFlipFlops() · also: has_flip_flopshasLoops() · also: has_loopshasNonLocalReturns() · also: has_non_local_returnshashCode()getId() · also: get_idinlineMethod(org.jruby.ir.IRMethod methodToInline, org.jruby.RubyModule metaclass, long callsiteId, int classToken, boolean cloneHost)inlineMethodCompiled(org.jruby.ir.IRMethod methodToInline, org.jruby.RubyModule implClass, long callsiteId, int classToken, boolean cloneHost)inlineMethodJIT(org.jruby.ir.IRMethod methodToInline, org.jruby.RubyModule implClass, long callsiteId, int classToken, boolean cloneHost)inliningAllowed()getInterpreterContext() · also: get_interpreter_contextisNestedInClosure(org.jruby.ir.IRClosure closure)isScopeContainedBy(org.jruby.ir.IRScope parentScope)returns whether this scope is contained by the parentScope parameter. For simplicity a scope is considered to contain itself.
| name | type | description |
|---|---|---|
| parent_scope | org.jruby.ir.IRScope | we want to see if it contains this scope |
Returns: true if this scope is contained by parentScope.
Returns the lexical scope that contains this scope definition
getLine() · also: get_linegetLocalVariables() · also: get_local_variablesGet the local variables for this scope. This should only be used by persistence layer.
lookupExistingLVar(org.jruby.RubySymbol name)maybeUsingRefinements()isModuleBody() · also: is_module_bodyDoes this scope represent a module body?
getNearestModuleReferencingScopeDepth() · also: get_nearest_module_referencing_scope_depthReturns 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.
getNearestNonClosurelikeScope() · also: get_nearest_non_closurelike_scopegetNearestTopLocalVariableScope() · also: get_nearest_top_local_variable_scopeneedsCodeCoverage()getNextLabelIndex() · also: get_next_label_indexsetNextLabelIndex(int index) · also: set_next_label_indexisNonSingletonClassBody() · also: is_non_singleton_class_bodyIs this IRClassBody but not IRMetaClassBody?
getOptimizedInterpreterContext() · also: get_optimized_interpreter_contextparentMaybeUsingRefinements()persistScopeFlags(org.jruby.ir.persistence.IRWriterEncoder file)Run any necessary passes to get the IR ready for compilation (AOT and/or JIT)
This initializes a more complete(full) InterpreterContext which if used in mixed mode will be used by the JIT and if used in pure-interpreted mode it will be used by an interpreter engine.
receivesClosureArg()receivesKeywordArgs()Returns the top level scope
isRuby2Keywords() · also: is_ruby2_keywordsgetScopeId() · also: get_scope_idisScriptScope() · also: is_script_scopeIs this an eval script or a regular file script?
setAccessesParentsLocalVariables()setCanCaptureCallersBinding()setCanReceiveBreaks()setCanReceiveNonlocalReturns()setHasBreakInstructions()setHasLoops()setHasNonLocalReturns()setIsMaybeUsingRefinements()setNeedsCodeCoverage()setReceivesClosureArg()setReceivesKeywordArgs()setRuby2Keywords()setUsesEval()setUsesSuper()setUsesZSuper()toString()toStringCompileForm()toStringInstrs()usesEval()usesSuper()usesZSuper()isWithinEND() · also: is_within_endisWithinMethod() · also: is_within_method| field | type | note |
|---|---|---|
| closureId | int |
allocateInterpreterContext(List<org.jruby.ir.instructions.Instr> instructions, int temporaryVariableCount, EnumSet<org.jruby.ir.IRFlags> flags)allocateInterpreterContext(java.util.function.Supplier<List<org.jruby.ir.instructions.Instr>> instructions, int temporaryVariableCount, EnumSet<org.jruby.ir.IRFlags> flags)getArgumentDescriptors() · also: get_argument_descriptorssetArgumentDescriptors(org.jruby.runtime.ArgumentDescriptor[] argDesc) · also: set_argument_descriptorsSet upon completion of IRBuild of this IRClosure.
isEND() · also: is_endgetLocalVariable(org.jruby.RubySymbol name, int depth)getNewLocalVariable(org.jruby.RubySymbol name, int depth)isNestedClosuresSafeForMethodConversion() · also: is_nested_closures_safe_for_method_conversiongetNextClosureId() · also: get_next_closure_idpersistScopeHeader(org.jruby.ir.persistence.IRWriterEncoder file)setIsEND()setSignature(org.jruby.runtime.Signature signature) · also: set_signaturetoStringBody()isTopLocalVariableScope() · also: is_top_local_variable_scopeisWhereFlipFlopStateVariableIs() · also: is_where_flip_flop_state_variable_is