public abstract class Operand extends Object
Modifier and Type | Field and Description |
---|---|
static Operand[] |
EMPTY_ARRAY |
Constructor and Description |
---|
Operand() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addUsedVariables(List<Variable> l)
Append the list of variables used in this operand to the input list -- force every operand
to implement this because a missing implementation can cause bad failures.
|
boolean |
canCopyPropagate()
Can we replace every use of a variable 'v' that contains the value of this operand
with the operand itself? This takes importance when there are at least two uses
of 'v' within this scope.
|
abstract Operand |
cloneForInlining(InlinerInfo ii) |
Operand |
fetchCompileTimeArrayElement(int index,
boolean getSubArray) |
Operand |
getSimplifiedOperand(Map<Operand,Operand> valueMap,
boolean force) |
Operand |
getValue(Map<Operand,Operand> valueMap) |
boolean |
hasKnownValue()
Do we know the value of this operand at compile-time?
If we do then it may be possible to constant propagate (one case:
We also know it is also an ImmutableLiteral).
|
Object |
retrieve(ThreadContext context,
IRubyObject self,
DynamicScope currDynScope,
Object[] temp) |
void |
visit(IRVisitor visitor) |
public static final Operand[] EMPTY_ARRAY
public boolean hasKnownValue()
public boolean canCopyPropagate()
public Operand getSimplifiedOperand(Map<Operand,Operand> valueMap, boolean force)
public Operand fetchCompileTimeArrayElement(int index, boolean getSubArray)
public abstract void addUsedVariables(List<Variable> l)
public abstract Operand cloneForInlining(InlinerInfo ii)
public Object retrieve(ThreadContext context, IRubyObject self, DynamicScope currDynScope, Object[] temp)
public void visit(IRVisitor visitor)
Copyright © 2001-2014 JRuby. All Rights Reserved.