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