public class FrozenString extends ImmutableLiteral implements Stringable
| Modifier and Type | Field and Description |
|---|---|
org.jruby.util.ByteList |
bytelist |
int |
coderange |
java.lang.String |
file |
int |
line |
java.lang.String |
string |
EMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
|
FrozenString(org.jruby.util.ByteList byteList,
int cr,
java.lang.String file,
int line)
Used by persistence and by .freeze optimization
|
|
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,
org.jruby.util.ByteList bytelist,
int coderange,
java.lang.String file,
int line) |
| 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) |
java.lang.Object |
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) |
org.jruby.util.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) |
cachedObject, canCopyPropagate, isCached, retrievegetSimplifiedOperand, getValuepublic final org.jruby.util.ByteList bytelist
public final java.lang.String string
public final int coderange
public final java.lang.String file
public final int line
public FrozenString(org.jruby.util.ByteList byteList,
int cr,
java.lang.String file,
int line)
protected FrozenString(java.lang.String string,
org.jruby.util.ByteList bytelist,
int coderange,
java.lang.String file,
int line)
public FrozenString(java.lang.String s)
public OperandType getOperandType()
getOperandType in class Operandpublic boolean hasKnownValue()
OperandhasKnownValue in class ImmutableLiteralpublic void addUsedVariables(java.util.List<Variable> l)
OperandaddUsedVariables in class ImmutableLiteralpublic 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 ImmutableLiteralpublic java.lang.Object createCacheObject(ThreadContext context)
ImmutableLiteralcreateCacheObject in class ImmutableLiteralpublic org.jruby.util.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-2017 JRuby. All Rights Reserved.