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| Constructor and Description |
|---|
StringLiteral(org.jruby.util.ByteList val) |
StringLiteral(org.jruby.util.ByteList val,
int coderange) |
StringLiteral(String s) |
| 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) |
boolean |
equals(Object other) |
org.jruby.util.ByteList |
getByteList() |
int |
getCodeRange() |
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, getOperandType, 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)
public StringLiteral(org.jruby.util.ByteList val,
int coderange)
public StringLiteral(String s)
public 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 int getCodeRange()
Copyright © 2001-2015 JRuby. All Rights Reserved.