public abstract class IRBlockBody extends ContextAwareBlockBody
Modifier and Type | Field and Description |
---|---|
protected IRClosure |
closure |
protected ThreadLocal<EvalType> |
evalType |
protected String |
fileName |
protected int |
lineNumber |
scope
EMPTY_PARAMETER_LIST, NULL_BODY, signature, testBlockBody
Constructor and Description |
---|
IRBlockBody(IRScope closure,
Signature signature) |
getStaticScope, post, pre, setStaticScope
arity, call, call, call, call, callDirect, getArgumentDescriptors, getSignature, getTestBlockBody, isGiven, prepareArgumentsForCall, testBlockBody, yield, yield, yield, yield, yieldDirect
protected final String fileName
protected final int lineNumber
protected final IRClosure closure
protected ThreadLocal<EvalType> evalType
public EvalType getEvalType()
public void setEvalType(EvalType evalType)
setEvalType
in class BlockBody
public abstract boolean canCallDirect()
canCallDirect
in class BlockBody
public IRubyObject call(ThreadContext context, Block block)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1)
public IRubyObject call(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args)
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)
public IRubyObject yieldSpecific(ThreadContext context, Block block)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, Block block, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
yieldSpecific
in class BlockBody
protected IRubyObject doYieldLambda(ThreadContext context, Block block, IRubyObject value)
public IRubyObject doYield(ThreadContext context, Block block, IRubyObject value)
BlockBody
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.
public IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)
BlockBody
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.
protected IRubyObject commonYieldPath(ThreadContext context, Block block, Block.Type type, IRubyObject[] args, IRubyObject self, Block blockArg)
public IRClosure getScope()
public String getFile()
BlockBody
Copyright © 2001-2016 JRuby. All Rights Reserved.