public abstract class IRBlockBody extends ContextAwareBlockBody
| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal<EvalType> |
evalType |
protected String |
fileName |
protected int |
lineNumber |
protected String[] |
parameterList |
protected Signature |
signature |
arity, scopeargumentType, ARRAY, EMPTY_PARAMETER_LIST, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS| Constructor and Description |
|---|
IRBlockBody(StaticScope staticScope,
String[] parameterList,
String fileName,
int lineNumber,
Signature signature) |
arity, getStaticScope, post, pre, setStaticScopeasArgumentType, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, isGiven, yield, yield, yield, yieldprotected String[] parameterList
protected final String fileName
protected final int lineNumber
protected ThreadLocal<EvalType> evalType
protected final Signature signature
public IRBlockBody(StaticScope staticScope, String[] parameterList, String fileName, int lineNumber, Signature signature)
public void setEvalType(EvalType evalType)
setEvalType in class BlockBodypublic Signature getSignature()
public String[] getParameterList()
getParameterList in class BlockBodypublic void setParameterList(String[] parameterList)
public IRubyObject call(ThreadContext context, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type, Block block)
public IRubyObject yieldSpecific(ThreadContext context, Binding binding, Block.Type type)
yieldSpecific in class BlockBodypublic IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
yieldSpecific in class BlockBodypublic IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
yieldSpecific in class BlockBodypublic IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
yieldSpecific in class BlockBodypublic IRubyObject doYield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, IRubyObject, Binding, Block.Type)
after ensuring that any common yield logic is taken care of.
public IRubyObject doYield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject, Binding, org.jruby.runtime.Block.Type)
after ensuring that all common yield logic is taken care of.
protected IRubyObject useBindingSelf(Binding binding)
protected abstract IRubyObject commonYieldPath(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type, Block block)
protected void blockArgWarning(Ruby ruby, int length)
protected IRubyObject[] convertToRubyArray(ThreadContext context, IRubyObject[] args)
public IRubyObject[] prepareArgumentsForCall(ThreadContext context, IRubyObject[] args, Block.Type type)
prepareArgumentsForCall in class BlockBodypublic String getFile()
BlockBodyCopyright © 2001-2015 JRuby. All Rights Reserved.