public class StringLiteral extends Operand
| Modifier and Type | Field and Description |
|---|---|
org.jruby.util.ByteList |
bytelist |
int |
coderange |
static StringLiteral |
EMPTY_STRING |
String |
string |
EMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
|
StringLiteral(org.jruby.util.ByteList val,
int coderange) |
|
StringLiteral(String s) |
protected |
StringLiteral(String string,
org.jruby.util.ByteList bytelist,
int coderange) |
| 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) |
static StringLiteral |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
boolean |
equals(Object other) |
org.jruby.util.ByteList |
getByteList() |
int |
getCodeRange() |
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).
|
Object |
retrieve(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
Object[] temp) |
String |
toString() |
void |
visit(IRVisitor visitor) |
canCopyPropagate, getSimplifiedOperand, getValuepublic static final StringLiteral EMPTY_STRING
public final org.jruby.util.ByteList bytelist
public final String string
public final int coderange
public StringLiteral(org.jruby.util.ByteList val,
int coderange)
protected StringLiteral(String string, org.jruby.util.ByteList bytelist, int coderange)
public StringLiteral(String s)
public OperandType getOperandType()
getOperandType in class Operandpublic boolean hasKnownValue()
OperandhasKnownValue in class Operandpublic void addUsedVariables(List<Variable> l)
OperandaddUsedVariables in class Operandpublic Operand cloneForInlining(CloneInfo ii)
cloneForInlining in class Operandpublic Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
public org.jruby.util.ByteList getByteList()
public String getString()
public void encode(IRWriterEncoder e)
public static StringLiteral decode(IRReaderDecoder d)
public int getCodeRange()
Copyright © 2001-2016 JRuby. All Rights Reserved.