public abstract class CallBase extends Instr implements Specializeable
| Modifier and Type | Field and Description |
|---|---|
protected Operand[] |
arguments |
protected CallSite |
callSite |
private static long |
callSiteCounter |
long |
callSiteId |
private CallType |
callType |
private boolean |
canBeEval |
protected Operand |
closure |
private boolean |
containsSplat |
private boolean |
dontInline |
private boolean |
flagsComputed |
protected MethAddr |
methAddr |
java.util.HashMap<DynamicMethod,java.lang.Integer> |
profile |
protected Operand |
receiver |
private boolean |
targetRequiresCallersBinding |
EMPTY_OPERANDS| Modifier | Constructor and Description |
|---|---|
protected |
CallBase(Operation op,
CallType callType,
MethAddr methAddr,
Operand receiver,
Operand[] args,
Operand closure) |
| Modifier and Type | Method and Description |
|---|---|
void |
blockInlining() |
private static Operand[] |
buildAllArgs(Operand methAddr,
Operand receiver,
Operand[] callArgs,
Operand closure) |
boolean |
canBeEval() |
boolean |
canModifyCode() |
boolean |
canSetDollarVars() |
Operand[] |
cloneCallArgs(InlinerInfo ii) |
private void |
computeFlags() |
private boolean |
computeRequiresCallersBindingFlag() |
protected static boolean |
containsSplat(Operand[] arguments) |
Operand[] |
getCallArgs() |
CallSite |
getCallSite() |
private static CallSite |
getCallSiteFor(CallType callType,
MethAddr methAddr) |
CallType |
getCallType() |
Operand |
getClosureArg(Operand ifUnspecified) |
private boolean |
getEvalFlag() |
MethAddr |
getMethodAddr() |
Operand[] |
getOperands() |
Operand |
getReceiver() |
boolean |
hasClosure() |
boolean |
inliningBlocked() |
java.lang.Object |
interpret(ThreadContext context,
DynamicScope dynamicScope,
IRubyObject self,
java.lang.Object[] temp,
Block block) |
boolean |
isAllConstants() |
boolean |
isAllFixnums() |
boolean |
isRubyInternalsCall() |
boolean |
isStaticCallTarget() |
protected IRubyObject[] |
prepareArguments(ThreadContext context,
IRubyObject self,
Operand[] arguments,
DynamicScope dynamicScope,
java.lang.Object[] temp) |
protected IRubyObject[] |
prepareArgumentsComplex(ThreadContext context,
IRubyObject self,
Operand[] args,
DynamicScope currDynScope,
java.lang.Object[] temp) |
protected IRubyObject[] |
prepareArgumentsSimple(ThreadContext context,
IRubyObject self,
Operand[] args,
DynamicScope currDynScope,
java.lang.Object[] temp) |
protected Block |
prepareBlock(ThreadContext context,
IRubyObject self,
DynamicScope currDynScope,
java.lang.Object[] temp) |
void |
simplifyOperands(java.util.Map<Operand,Operand> valueMap,
boolean force)
This method takes as input a map of operands to their values, and outputs
If the value map provides a value for any of the instruction's operands
this method is expected to replace the original operands with the simplified values.
|
CallBase |
specializeForInterpretation()
Interpreter can ask the instruction if it knows how to make a more
efficient instruction for direct interpretation.
|
boolean |
targetRequiresCallersBinding() |
java.lang.String |
toString() |
canBeDeleted, canRaiseException, cloneForBlockCloning, cloneForInlinedClosure, cloneForInlinedScope, cloneForInlining, getOperation, getUsedVariables, hasSideEffects, hasUnusedResult, interpretAndGetNewIPC, isDead, markDead, markUnusedResult, renameVars, simplifyAndGetResult, transfersControl, visitprivate static long callSiteCounter
public final long callSiteId
protected Operand receiver
protected Operand[] arguments
protected Operand closure
protected MethAddr methAddr
protected CallSite callSite
private final CallType callType
private boolean flagsComputed
private boolean canBeEval
private boolean targetRequiresCallersBinding
public java.util.HashMap<DynamicMethod,java.lang.Integer> profile
private boolean dontInline
private boolean containsSplat
public Operand[] getOperands()
getOperands in class Instrpublic MethAddr getMethodAddr()
public Operand getReceiver()
public Operand[] getCallArgs()
public CallSite getCallSite()
public CallType getCallType()
public void blockInlining()
public boolean inliningBlocked()
public boolean hasClosure()
public boolean isAllConstants()
public boolean isAllFixnums()
public CallBase specializeForInterpretation()
specializeForInterpretation in interface Specializeablepublic void simplifyOperands(java.util.Map<Operand,Operand> valueMap, boolean force)
InstrsimplifyOperands in class Instrpublic Operand[] cloneCallArgs(InlinerInfo ii)
public boolean isRubyInternalsCall()
public boolean isStaticCallTarget()
public boolean canModifyCode()
private boolean getEvalFlag()
private boolean computeRequiresCallersBindingFlag()
private void computeFlags()
public boolean canBeEval()
public boolean targetRequiresCallersBinding()
public boolean canSetDollarVars()
protected static boolean containsSplat(Operand[] arguments)
private static Operand[] buildAllArgs(Operand methAddr, Operand receiver, Operand[] callArgs, Operand closure)
public java.lang.Object interpret(ThreadContext context, DynamicScope dynamicScope, IRubyObject self, java.lang.Object[] temp, Block block)
protected IRubyObject[] prepareArguments(ThreadContext context, IRubyObject self, Operand[] arguments, DynamicScope dynamicScope, java.lang.Object[] temp)
protected IRubyObject[] prepareArgumentsSimple(ThreadContext context, IRubyObject self, Operand[] args, DynamicScope currDynScope, java.lang.Object[] temp)
protected IRubyObject[] prepareArgumentsComplex(ThreadContext context, IRubyObject self, Operand[] args, DynamicScope currDynScope, java.lang.Object[] temp)
protected Block prepareBlock(ThreadContext context, IRubyObject self, DynamicScope currDynScope, java.lang.Object[] temp)