Package org.jruby.ir
Class IRMethod
java.lang.Object
org.jruby.ir.IRScope
org.jruby.ir.IRMethod
- All Implemented Interfaces:
ParseResult
-
Field Summary
FieldsFields inherited from class org.jruby.ir.IRScope
compilable, fullInterpreterContext, interpreterContext, LOG, nextClosureIndex, optimizedInterpreterContext
-
Constructor Summary
ConstructorsConstructorDescriptionIRMethod
(IRManager manager, IRScope lexicalParent, LazyMethodDefinition defn, ByteList name, boolean isInstanceMethod, int lineNumber, StaticScope staticScope, int coverageMode) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.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.protected LocalVariable
findExistingLocalVariable
(RubySymbol name, int scopeDepth) getLocalVariable
(RubySymbol name, int scopeDepth) Find or create a local variable.boolean
For lazy scopes which IRBuild on demand we can ask this method whether it has been built yet...final InterpreterContext
Run any necessary passes to get the IR ready for compilation (AOT and/or JIT)void
setArgumentDescriptors
(ArgumentDescriptor[] argDesc) Set upon completion of IRBuild of this IRMethod.Methods inherited from class org.jruby.ir.IRScope
accessesParentsLocalVariables, addChildScope, addClosure, allocateInitialFlags, allocateInterpreterContext, allocateInterpreterContext, anyUsesEval, buildJVMExceptionTable, canCaptureCallersBinding, canReceiveBreaks, canReceiveNonlocalReturns, captureParentRefinements, cleanupAfterExecution, correctVariableDepthForForLoopsForEncoding, debugOutput, depends, dumpToIGV, equals, executesOnce, getAST, getByteName, getClosures, getCoverageMode, getDynamicScope, getEncoding, getExecutedPasses, getExecutionContext, getFile, getFileName, getFullInterpreterContext, getFullyQualifiedName, getId, getInterpreterContext, getLexicalParent, getLexicalScopes, getLine, getLineNumber, getLocalVariables, getManager, getName, getNearestMethod, getNearestModuleReferencingScopeDepth, getNearestNonClosurelikeScope, getNearestTopLocalVariableScope, getNewLabel, getNewLabel, getNewLocalVariable, getNextClosureId, getNextLabelIndex, getOptimizedInterpreterContext, getRootLexicalScope, getScopeId, getSelf, getStaticScope, hasBreakInstructions, hasFlipFlops, hashCode, hasLoops, hasNonLocalReturns, inlineMethod, inlineMethodCompiled, inlineMethodJIT, inliningAllowed, isModuleBody, isNestedInClosure, isNonSingletonClassBody, isRuby2Keywords, isScopeContainedBy, isScriptScope, isTopLocalVariableScope, isWhereFlipFlopStateVariableIs, isWithinEND, lookupExistingLVar, maybeUsingRefinements, needsCodeCoverage, parentMaybeUsingRefinements, persistScopeFlags, persistScopeHeader, 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
-
Field Details
-
isInstanceMethod
public final boolean isInstanceMethod -
argDesc
-
-
Constructor Details
-
IRMethod
public IRMethod(IRManager manager, IRScope lexicalParent, LazyMethodDefinition defn, ByteList name, boolean isInstanceMethod, int lineNumber, StaticScope staticScope, int coverageMode)
-
-
Method Details
-
hasBeenBuilt
public boolean hasBeenBuilt()Description copied from class:IRScope
For lazy scopes which IRBuild on demand we can ask this method whether it has been built yet...- Overrides:
hasBeenBuilt
in classIRScope
-
getMethodData
-
builtInterpreterContext
- Overrides:
builtInterpreterContext
in classIRScope
-
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
-
builtInterperterContextForJavaConstructor
Deprecated.This method was renamed (due a typo).- See Also:
-
lazilyAcquireInterpreterContext
-
prepareForCompilation
Description copied from class:IRScope
Run any necessary passes to get the IR ready for compilation (AOT and/or JIT)- Overrides:
prepareForCompilation
in classIRScope
-
getScopeType
- Specified by:
getScopeType
in classIRScope
-
findExistingLocalVariable
- Overrides:
findExistingLocalVariable
in classIRScope
-
getLocalVariable
Description copied from class:IRScope
Find or create a local variable. By default, scopes are assumed to only check current depth. Blocks/Closures override this because they have special nesting rules.- Overrides:
getLocalVariable
in classIRScope
-
getArgumentDescriptors
-
setArgumentDescriptors
Set upon completion of IRBuild of this IRMethod.
-