Package org.jruby.runtime
Class IRBlockBody
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.ContextAwareBlockBody
org.jruby.runtime.IRBlockBody
- Direct Known Subclasses:
CompiledIRBlockBody
,InterpretedIRBlockBody
,MixedModeIRBlockBody
-
Field Summary
FieldsFields inherited from class org.jruby.runtime.ContextAwareBlockBody
scope
Fields inherited from class org.jruby.runtime.BlockBody
NULL_BODY, signature, testBlockBody
-
Constructor Summary
ConstructorsConstructorDescriptionIRBlockBody
(IRScope closure, Signature signature) IRBlockBody
(StaticScope scope, String file, int line, Signature signature) -
Method Summary
Modifier and TypeMethodDescriptioncall
(ThreadContext context, Block block) call
(ThreadContext context, Block block, IRubyObject arg0) call
(ThreadContext context, Block block, IRubyObject[] args) call
(ThreadContext context, Block block, IRubyObject[] args, Block blockArg) call
(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1) call
(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) abstract boolean
protected abstract IRubyObject
commonYieldPath
(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self, Block blockArg) doYield
(ThreadContext context, Block block, IRubyObject value) Subclass specific yield implementation.doYield
(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Subclass specific yield implementation.protected IRubyObject
doYieldLambda
(ThreadContext context, Block block, IRubyObject value) getFile()
Get the filename for this blockint
getLine()
get The line number for this blockgetScope()
boolean
Is this block represented by Ruby code?static IRubyObject[]
toAry
(ThreadContext context, IRubyObject value) yieldSpecific
(ThreadContext context, Block block) yieldSpecific
(ThreadContext context, Block block, IRubyObject arg0) yieldSpecific
(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1) yieldSpecific
(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) 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, callDirect, getArgumentDescriptors, getSignature, getTestBlockBody, isGiven, prepareArgumentsForCall, testBlockBody, yield, yield, yield, yield, yieldDirect
-
Field Details
-
fileName
-
lineNumber
protected final int lineNumber
-
-
Constructor Details
-
IRBlockBody
-
IRBlockBody
-
-
Method Details
-
canCallDirect
public abstract boolean canCallDirect()- Overrides:
canCallDirect
in classBlockBody
-
call
-
call
-
call
-
call
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) -
call
-
call
-
yieldSpecific
- Overrides:
yieldSpecific
in classBlockBody
-
yieldSpecific
- Overrides:
yieldSpecific
in classBlockBody
-
yieldSpecific
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1) - Overrides:
yieldSpecific
in classBlockBody
-
yieldSpecific
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) - Overrides:
yieldSpecific
in classBlockBody
-
toAry
-
doYieldLambda
-
doYield
Description copied from class:BlockBody
Subclass specific yield implementation.Should not be called directly. Gets called by
BlockBody.yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject)
after ensuring that any common yield logic is taken care of. -
doYield
public IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Description copied from class:BlockBody
Subclass specific yield implementation.Should not be called directly. Gets called by
BlockBody.yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject)
after ensuring that all common yield logic is taken care of. -
commonYieldPath
protected abstract IRubyObject commonYieldPath(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self, Block blockArg) -
getScope
-
getFile
Description copied from class:BlockBody
Get the filename for this block -
getLine
public int getLine()Description copied from class:BlockBody
get The line number for this block -
isRubyBlock
public boolean isRubyBlock()Description copied from class:BlockBody
Is this block represented by Ruby code?- Overrides:
isRubyBlock
in classBlockBody
-