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, getValue
public 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 Operand
public boolean hasKnownValue()
Operand
hasKnownValue
in class Operand
public void addUsedVariables(List<Variable> l)
Operand
addUsedVariables
in class Operand
public Operand cloneForInlining(CloneInfo ii)
cloneForInlining
in class Operand
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
public org.jruby.util.ByteList getByteList()
public String getString()
getString
in interface Stringable
public void encode(IRWriterEncoder e)
public static StringLiteral decode(IRReaderDecoder d)
public int getCodeRange()
Copyright © 2001-2016 JRuby. All Rights Reserved.