public abstract class Operand extends Object
Modifier and Type | Field and Description |
---|---|
static Operand[] |
EMPTY_ARRAY |
Constructor and Description |
---|
Operand(OperandType type) |
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(CloneInfo ii) |
void |
encode(IRWriterEncoder e) |
OperandType |
getOperandType() |
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,
StaticScope currScope,
DynamicScope currDynScope,
Object[] temp) |
void |
visit(IRVisitor visitor) |
public static final Operand[] EMPTY_ARRAY
public Operand(OperandType type)
public final OperandType getOperandType()
public boolean hasKnownValue()
public boolean canCopyPropagate()
public Operand getSimplifiedOperand(Map<Operand,Operand> valueMap, boolean force)
public abstract void addUsedVariables(List<Variable> l)
public void encode(IRWriterEncoder e)
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
public void visit(IRVisitor visitor)
Copyright © 2001-2015 JRuby. All Rights Reserved.