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, retrieve
getSimplifiedOperand, getValue
public 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 Operand
public boolean hasKnownValue()
Operand
hasKnownValue
in class ImmutableLiteral
public void addUsedVariables(List<Variable> l)
Operand
addUsedVariables
in class ImmutableLiteral
public Operand cloneForInlining(CloneInfo ii)
cloneForInlining
in class ImmutableLiteral
public Object createCacheObject(ThreadContext context)
ImmutableLiteral
createCacheObject
in class ImmutableLiteral
public org.jruby.util.ByteList getByteList()
public String getString()
getString
in interface Stringable
public 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.