Package org.jruby.runtime
Class InterpretedIRBlockBody
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.ContextAwareBlockBody
org.jruby.runtime.IRBlockBody
org.jruby.runtime.InterpretedIRBlockBody
- All Implemented Interfaces:
Compilable<InterpreterContext>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
protected final boolean
Fields inherited from class org.jruby.runtime.IRBlockBody
fileName, lineNumber
Fields inherited from class org.jruby.runtime.ContextAwareBlockBody
scope
Fields inherited from class org.jruby.runtime.BlockBody
NULL_BODY, signature, testBlockBody
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IRubyObject
callDirect
(ThreadContext context, Block block, IRubyObject[] args, Block blockArg) boolean
protected IRubyObject
commonYieldPath
(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self, Block blockArg) void
completeBuild
(ThreadContext context, InterpreterContext interpreterContext) boolean
forceBuild
(ThreadContext context) Force this Compilable to finish its build process.getName()
getOwnerName
(ThreadContext context) getScope()
boolean
Indicates whether this Compilable has completed its build process.void
setCallCount
(int callCount) protected IRubyObject
yieldDirect
(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Methods inherited from class org.jruby.runtime.IRBlockBody
call, call, call, call, call, call, doYield, doYield, doYieldLambda, getFile, getLine, isRubyBlock, toAry, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific
Methods inherited from class org.jruby.runtime.ContextAwareBlockBody
getStaticScope, post, pre, setStaticScope
Methods inherited from class org.jruby.runtime.BlockBody
arity, call, call, call, call, getSignature, getTestBlockBody, isGiven, prepareArgumentsForCall, testBlockBody, yield, yield, yield, yield
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jruby.compiler.Compilable
completeBuild, getClassName, getFile, getLine, getOwnerName
-
Field Details
-
pushScope
protected final boolean pushScope -
reuseParentScope
protected final boolean reuseParentScope
-
-
Constructor Details
-
InterpretedIRBlockBody
-
-
Method Details
-
setCallCount
public void setCallCount(int callCount) - Specified by:
setCallCount
in interfaceCompilable<InterpreterContext>
-
completeBuild
- Specified by:
completeBuild
in interfaceCompilable<InterpreterContext>
-
getIRScope
- Specified by:
getIRScope
in interfaceCompilable<InterpreterContext>
-
getArgumentDescriptors
- Overrides:
getArgumentDescriptors
in classBlockBody
-
ensureInstrsReady
- Specified by:
ensureInstrsReady
in interfaceCompilable<InterpreterContext>
-
getOwnerName
- Specified by:
getOwnerName
in interfaceCompilable<InterpreterContext>
-
getName
- Specified by:
getName
in interfaceCompilable<InterpreterContext>
- Returns:
- method/closure identifier
-
canCallDirect
public boolean canCallDirect()- Specified by:
canCallDirect
in classIRBlockBody
-
callDirect
protected IRubyObject callDirect(ThreadContext context, Block block, IRubyObject[] args, Block blockArg) - Overrides:
callDirect
in classBlockBody
-
yieldDirect
protected IRubyObject yieldDirect(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) - Overrides:
yieldDirect
in classBlockBody
-
commonYieldPath
protected IRubyObject commonYieldPath(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self, Block blockArg) - Specified by:
commonYieldPath
in classIRBlockBody
-
forceBuild
Description copied from interface:Compilable
Force this Compilable to finish its build process. Override this andCompilable.isBuildComplete()
for implementations that have a build process.- Specified by:
forceBuild
in interfaceCompilable<InterpreterContext>
- Parameters:
context
- the current thread context- Returns:
- true if the forced build completed; false otherwise
-
isBuildComplete
public boolean isBuildComplete()Description copied from interface:Compilable
Indicates whether this Compilable has completed its build process. Override this andCompilable.forceBuild(ThreadContext)
for implementations that have a build process.- Specified by:
isBuildComplete
in interfaceCompilable<InterpreterContext>
- Returns:
- true if the build has completed; false otherwise.
-
getImplementationClass
- Specified by:
getImplementationClass
in interfaceCompilable<InterpreterContext>
-
getScope
- Overrides:
getScope
in classIRBlockBody
-