public abstract class CallBase extends NOperandInstr implements ClosureAcceptingInstr, Site
Modifier and Type | Field and Description |
---|---|
protected int |
argsCount |
protected CallSite |
callSite |
static long |
callSiteCounter |
long |
callSiteId |
protected boolean |
hasClosure |
protected RubySymbol |
name |
protected boolean |
procNew |
operands
EMPTY_OPERANDS
Modifier | Constructor and Description |
---|---|
protected |
CallBase(IRScope scope,
Operation op,
CallType callType,
RubySymbol name,
Operand receiver,
Operand[] args,
Operand closure,
boolean potentiallyRefined) |
protected |
CallBase(IRScope scope,
Operation op,
CallType callType,
RubySymbol name,
Operand receiver,
Operand[] args,
Operand closure,
boolean potentiallyRefined,
CallSite callSite,
long callSiteId) |
Modifier and Type | Method and Description |
---|---|
void |
blockInlining() |
boolean |
canBeEval() |
Operand[] |
cloneCallArgs(CloneInfo ii) |
boolean |
computeScopeFlags(IRScope scope,
java.util.EnumSet<IRFlags> flags)
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(IRScope scope,
CallType callType,
java.lang.String name,
long callsiteId,
boolean hasLiteralClosure,
boolean potentiallyRefined) |
long |
getCallSiteId() |
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() |
abstract Variable |
getResult() |
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 |
setCallSiteId(long callSiteId) |
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 static long callSiteCounter
public transient long callSiteId
protected RubySymbol name
protected final transient CallSite callSite
protected final transient int argsCount
protected final transient boolean hasClosure
protected transient boolean procNew
protected CallBase(IRScope scope, Operation op, CallType callType, RubySymbol name, Operand receiver, Operand[] args, Operand closure, boolean potentiallyRefined)
public void encode(IRWriterEncoder e)
public java.lang.String getId()
public long getCallSiteId()
getCallSiteId
in interface Site
public void setCallSiteId(long callSiteId)
setCallSiteId
in interface Site
public RubySymbol getName()
public Operand getClosureArg()
getClosureArg
in interface ClosureAcceptingInstr
public Operand getReceiver()
public abstract Variable getResult()
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(IRScope scope, CallType callType, java.lang.String name, long callsiteId, boolean hasLiteralClosure, 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, java.util.EnumSet<IRFlags> flags)
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-2022 JRuby. All Rights Reserved.