public class MutableString extends Operand implements Stringable, StringLiteral
| Modifier and Type | Field and Description |
|---|---|
static MutableString |
EMPTY_STRING |
FrozenString |
frozenString |
EMPTY_ARRAY| Constructor and Description |
|---|
MutableString(ByteList val,
int coderange,
java.lang.String file,
int line) |
MutableString(RubySymbol symbol) |
MutableString(java.lang.String s) |
| 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 -- force every operand
to implement this because a missing implementation can cause bad failures.
|
Operand |
cloneForInlining(CloneInfo ii) |
static MutableString |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
boolean |
equals(java.lang.Object other) |
ByteList |
getByteList() |
int |
getCodeRange() |
OperandType |
getOperandType() |
java.lang.String |
getString() |
int |
hashCode() |
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).
|
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, getSimplifiedOperand, getValue, isFalseyImmediate, isTruthyImmediatepublic static final MutableString EMPTY_STRING
public final FrozenString frozenString
public MutableString(ByteList val, int coderange, java.lang.String file, int line)
public MutableString(java.lang.String s)
public MutableString(RubySymbol symbol)
public OperandType getOperandType()
getOperandType in class Operandpublic boolean hasKnownValue()
OperandhasKnownValue in class Operandpublic void addUsedVariables(java.util.List<Variable> l)
OperandaddUsedVariables in class Operandpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic Operand cloneForInlining(CloneInfo ii)
cloneForInlining in class Operandpublic java.lang.Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
public ByteList getByteList()
getByteList in interface StringLiteralpublic java.lang.String getString()
getString in interface Stringablepublic void encode(IRWriterEncoder e)
public static MutableString decode(IRReaderDecoder d)
public int getCodeRange()
getCodeRange in interface StringLiteralCopyright © 2001-2022 JRuby. All Rights Reserved.