| Modifier and Type | Field and Description |
|---|---|
| public static final Operand[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public 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. |
| public boolean | Returns: true if it is safe to copy-propagate the operand.Can we replace every use of a variable 'v' that contains the value of this operand with the operand itself? |
| public abstract Operand | |
| public void | |
| public abstract OperandType | |
| public Operand | |
| public Operand | |
| public boolean | Returns: true if a known compile-time value.Do we know the value of this operand at compile-time? |
| public boolean | |
| public boolean | isTruthyImmediate()
Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc) |
| public Object | retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
|
| public void |
| EMPTY_ARRAY | back to summary |
|---|---|
| public static final Operand[] EMPTY_ARRAY | |
| Operand | back to summary |
|---|---|
| public Operand() | |
| addUsedVariables | back to summary |
|---|---|
| public 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. | |
| canCopyPropagate | back to summary |
|---|---|
| public 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. Ex: v = [1,2,3]; x = v; y = v In this case, we cannot replace the occurrences of 'v' because we would then get x = [1,2,3]; y = [1,2,3] which would then result in two different array objects being constructed instead of a single one.
| |
| cloneForInlining | back to summary |
|---|---|
| public abstract Operand cloneForInlining(CloneInfo ii) | |
| encode | back to summary |
|---|---|
| public void encode(IRWriterEncoder e) | |
| getOperandType | back to summary |
|---|---|
| public abstract OperandType getOperandType() | |
| getSimplifiedOperand | back to summary |
|---|---|
| public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) | |
| getValue | back to summary |
|---|---|
| public Operand getValue(Map<Operand, Operand> valueMap) | |
| hasKnownValue | back to summary |
|---|---|
| public 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).
| |
| isFalseyImmediate | back to summary |
|---|---|
| public boolean isFalseyImmediate() | |
| isTruthyImmediate | back to summary |
|---|---|
| public boolean isTruthyImmediate() Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc) | |
| retrieve | back to summary |
|---|---|
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
| |
| visit | back to summary |
|---|---|
| public void visit(IRVisitor visitor) | |