public class FrozenString extends ImmutableLiteral<RubyString> implements Stringable
| Modifier and Type | Field and Description |
|---|---|
ByteList |
bytelist |
int |
coderange |
java.lang.String |
file |
int |
line |
java.lang.String |
string |
EMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
|
FrozenString(ByteList byteList,
int cr,
java.lang.String file,
int line)
Used by persistence and by .freeze optimization
|
|
FrozenString(RubySymbol symbol) |
|
FrozenString(java.lang.String s)
IRBuild.buildGetDefinition returns a frozen string and this is for all intern'd Java strings.
|
protected |
FrozenString(java.lang.String string,
ByteList bytelist,
int coderange,
java.lang.String file,
int line) |
| Modifier and Type | Method and Description |
|---|---|
Operand |
cloneForInlining(CloneInfo ii) |
RubyString |
createCacheObject(ThreadContext context)
Implementing class is responsible for constructing the cached value.
|
static FrozenString |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
boolean |
equals(java.lang.Object other) |
ByteList |
getByteList() |
int |
getCodeRange() |
java.lang.String |
getFile() |
int |
getLine() |
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.String |
toString() |
void |
visit(IRVisitor visitor) |
addUsedVariables, cachedObject, canCopyPropagate, isCached, retrievegetSimplifiedOperand, getValuepublic final ByteList bytelist
public final java.lang.String string
public final int coderange
public final java.lang.String file
public final int line
public FrozenString(ByteList byteList, int cr, java.lang.String file, int line)
protected FrozenString(java.lang.String string,
ByteList bytelist,
int coderange,
java.lang.String file,
int line)
public FrozenString(RubySymbol symbol)
public FrozenString(java.lang.String s)
public OperandType getOperandType()
getOperandType in class Operandpublic boolean hasKnownValue()
OperandhasKnownValue in class ImmutableLiteral<RubyString>public 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 ImmutableLiteral<RubyString>public RubyString createCacheObject(ThreadContext context)
ImmutableLiteralcreateCacheObject in class ImmutableLiteral<RubyString>public ByteList getByteList()
public java.lang.String getString()
getString in interface Stringablepublic java.lang.String getFile()
public int getLine()
public void encode(IRWriterEncoder e)
public static FrozenString decode(IRReaderDecoder d)
public int getCodeRange()
Copyright © 2001-2018 JRuby. All Rights Reserved.