public class StringLiteral extends Operand implements Stringable
| Modifier and Type | Field and Description |
|---|---|
static StringLiteral |
EMPTY_STRING |
FrozenString |
frozenString |
EMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
|
StringLiteral(org.jruby.util.ByteList val,
int coderange,
String file,
int line) |
|
StringLiteral(String s) |
protected |
StringLiteral(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) |
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 FrozenString frozenString
public StringLiteral(org.jruby.util.ByteList val,
int coderange,
String file,
int line)
protected StringLiteral(String string, org.jruby.util.ByteList bytelist, int coderange, String file, int line)
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()
getString in interface Stringablepublic void encode(IRWriterEncoder e)
public static StringLiteral decode(IRReaderDecoder d)
public int getCodeRange()
Copyright © 2001-2016 JRuby. All Rights Reserved.