public class Hash extends Operand
Modifier and Type | Field and Description |
---|---|
boolean |
isKWArgsHash |
KeyValuePair<Operand,Operand>[] |
pairs |
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
Hash(KeyValuePair<Operand,Operand>[] pairs,
boolean isKWArgsHash) |
|
Hash(java.util.List<KeyValuePair<Operand,Operand>> pairs) |
|
Hash(java.util.List<KeyValuePair<Operand,Operand>> pairs,
boolean isKWArgsHash) |
Modifier and Type | Method and Description |
---|---|
void |
addUsedVariables(java.util.List<Variable> l)
Append the list of variables used in this operand to the input list
|
Operand |
cloneForInlining(CloneInfo ii) |
Operand |
cloneForLVarDepth(int newDepth) |
static Hash |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
OperandType |
getOperandType() |
java.util.List<KeyValuePair<Operand,Operand>> |
getPairs() |
Operand |
getSimplifiedOperand(java.util.Map<Operand,Operand> valueMap,
boolean force) |
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).
|
boolean |
isBlank() |
java.lang.Object |
retrieve(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
java.lang.String |
toString() |
void |
visit(IRVisitor visitor) |
canCopyPropagate, getValue, isFalseyImmediate, isTruthyImmediate
public final KeyValuePair<Operand,Operand>[] pairs
public final boolean isKWArgsHash
public Hash(java.util.List<KeyValuePair<Operand,Operand>> pairs, boolean isKWArgsHash)
protected Hash(KeyValuePair<Operand,Operand>[] pairs, boolean isKWArgsHash)
public Hash(java.util.List<KeyValuePair<Operand,Operand>> pairs)
public OperandType getOperandType()
getOperandType
in class Operand
public boolean isBlank()
public boolean hasKnownValue()
Operand
hasKnownValue
in class Operand
public Operand getSimplifiedOperand(java.util.Map<Operand,Operand> valueMap, boolean force)
getSimplifiedOperand
in class Operand
public void addUsedVariables(java.util.List<Variable> l)
addUsedVariables
in class Operand
public Operand cloneForLVarDepth(int newDepth)
public Operand cloneForInlining(CloneInfo ii)
cloneForInlining
in class Operand
public java.lang.Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
public void encode(IRWriterEncoder e)
public static Hash decode(IRReaderDecoder d)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<KeyValuePair<Operand,Operand>> getPairs()
Copyright © 2001-2022 JRuby. All Rights Reserved.