| field | type | note |
|---|---|---|
| isInstanceMethod | boolean |
<init>(org.jruby.ir.IRManager manager, org.jruby.ir.IRScope lexicalParent, org.jruby.ir.builder.LazyMethodDefinition defn, org.jruby.util.ByteList name, boolean isInstanceMethod, int lineNumber, org.jruby.parser.StaticScope staticScope, int coverageMode)getArgumentDescriptors() · also: get_argument_descriptorssetArgumentDescriptors(org.jruby.runtime.ArgumentDescriptor[] argDesc) · also: set_argument_descriptorsSet upon completion of IRBuild of this IRMethod.
builtInterpreterContextForJavaConstructor()initialize methods in reified Java types will try and dispatch to the Java base classes constructor when the Ruby in the initialize: a) The super call is still valid in terms of Java (e.g. you cannot access self/this before the super call b) We can detect the validity of 'a'. Limitations like super in all paths of branches is not supported (for now). In cases where no super exists or it is unsupported we will return a normal interpreter (and a warning when unsupported):
Returns: appropriate interpretercontext
getLocalVariable(org.jruby.RubySymbol name, int scopeDepth)hasBeenBuilt() · also: has_been_built| field | type | note |
|---|---|---|
| LOG | Logger | |
| compilable | Compilable |
accessesParentsLocalVariables()allocateInterpreterContext(List<org.jruby.ir.instructions.Instr> instructions, int tempVariableCount, EnumSet<org.jruby.ir.IRFlags> flags)Make version specific to scope which needs it (e.g. Closure vs non-closure).
allocateInterpreterContext(java.util.function.Supplier<List<org.jruby.ir.instructions.Instr>> instructions, int tempVariableCount, EnumSet<org.jruby.ir.IRFlags> flags)Make version specific to scope which needs it (e.g. Closure vs non-closure).
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_namegetNewLocalVariable(org.jruby.RubySymbol name, int scopeDepth)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()getNextClosureId() · also: get_next_closure_idgetNextLabelIndex() · 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)persistScopeHeader(org.jruby.ir.persistence.IRWriterEncoder file)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()isTopLocalVariableScope() · also: is_top_local_variable_scopeusesEval()usesSuper()usesZSuper()isWhereFlipFlopStateVariableIs() · also: is_where_flip_flop_state_variable_isisWithinEND() · also: is_within_endisWithinMethod() · also: is_within_method