public abstract class CallBase extends NOperandInstr implements ClosureAcceptingInstr
Modifier and Type | Field and Description |
---|---|
protected int |
argsCount |
protected CallSite |
callSite |
long |
callSiteId |
protected boolean |
hasClosure |
protected RubySymbol |
name |
operands
EMPTY_OPERANDS
Modifier | Constructor and Description |
---|---|
protected |
CallBase(Operation op,
CallType callType,
RubySymbol name,
Operand receiver,
Operand[] args,
Operand closure,
boolean potentiallyRefined) |
Modifier and Type | Method and Description |
---|---|
void |
blockInlining() |
boolean |
canBeEval() |
Operand[] |
cloneCallArgs(CloneInfo ii) |
boolean |
computeScopeFlags(IRScope scope)
Does this instruction do anything the scope is interested in?
|
static boolean |
containsArgSplat(Operand[] arguments) |
void |
encode(IRWriterEncoder e) |
Operand |
getArg1()
This getter is potentially unsafe if you do not know you have >=1 arguments to the call.
|
int |
getArgsCount() |
Operand[] |
getCallArgs() |
CallSite |
getCallSite() |
protected static CallSite |
getCallSiteFor(CallType callType,
java.lang.String name,
boolean potentiallyRefined) |
CallType |
getCallType() |
Operand |
getClosureArg()
From interface ClosureAcceptingInstr
|
Operand |
getClosureArg(Operand ifUnspecified) |
java.lang.String |
getId()
raw identifier string (used by method table).
|
RubySymbol |
getName() |
Operand |
getReceiver() |
boolean |
hasLiteralClosure() |
boolean |
inliningBlocked() |
java.lang.Object |
interpret(ThreadContext context,
StaticScope currScope,
DynamicScope dynamicScope,
IRubyObject self,
java.lang.Object[] temp) |
static boolean |
isAllFixnums(Operand[] args) |
static boolean |
isAllFloats(Operand[] args) |
boolean |
isPotentiallyRefined() |
protected IRubyObject[] |
prepareArguments(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope dynamicScope,
java.lang.Object[] temp) |
protected IRubyObject[] |
prepareArgumentsComplex(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
protected IRubyObject[] |
prepareArgumentsSimple(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
Block |
prepareBlock(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
void |
setProcNew(boolean procNew) |
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.
|
boolean[] |
splatMap() |
boolean |
targetRequiresCallersBinding() |
boolean |
targetRequiresCallersFrame() |
java.lang.String[] |
toStringNonOperandArgs() |
getOperands, setOperand
canBeDeletedFromScope, canRaiseException, clone, cloneOperands, dumpableFields, getOperation, getUsedVariables, hasSideEffects, interpretAndGetNewIPC, isDead, isDeletable, markDead, renameVars, simplifyAndGetResult, toString, transfersControl, visit
public final transient long callSiteId
protected RubySymbol name
protected final transient CallSite callSite
protected final transient int argsCount
protected final transient boolean hasClosure
public void encode(IRWriterEncoder e)
public java.lang.String getId()
public RubySymbol getName()
public Operand getClosureArg()
getClosureArg
in interface ClosureAcceptingInstr
public Operand getReceiver()
public Operand getArg1()
public int getArgsCount()
public Operand[] getCallArgs()
public CallSite getCallSite()
public CallType getCallType()
public boolean[] splatMap()
public void setProcNew(boolean procNew)
public void blockInlining()
public boolean inliningBlocked()
protected static CallSite getCallSiteFor(CallType callType, java.lang.String name, boolean potentiallyRefined)
public boolean hasLiteralClosure()
hasLiteralClosure
in interface ClosureAcceptingInstr
public static boolean isAllFixnums(Operand[] args)
public static boolean isAllFloats(Operand[] args)
public boolean isPotentiallyRefined()
public boolean computeScopeFlags(IRScope scope)
Instr
computeScopeFlags
in class Instr
public void simplifyOperands(java.util.Map<Operand,Operand> valueMap, boolean force)
Instr
simplifyOperands
in class Instr
public boolean canBeEval()
public boolean targetRequiresCallersBinding()
public boolean targetRequiresCallersFrame()
public java.lang.String[] toStringNonOperandArgs()
toStringNonOperandArgs
in class Instr
public static boolean containsArgSplat(Operand[] arguments)
public java.lang.Object interpret(ThreadContext context, StaticScope currScope, DynamicScope dynamicScope, IRubyObject self, java.lang.Object[] temp)
protected IRubyObject[] prepareArguments(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope dynamicScope, java.lang.Object[] temp)
protected IRubyObject[] prepareArgumentsSimple(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
protected IRubyObject[] prepareArgumentsComplex(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
public Block prepareBlock(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
Copyright © 2001-2018 JRuby. All Rights Reserved.