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,
java.lang.String file,
int line) |
|
StringLiteral(RubySymbol symbol) |
|
StringLiteral(java.lang.String s) |
protected |
StringLiteral(java.lang.String string,
org.jruby.util.ByteList bytelist,
int coderange,
java.lang.String file,
int line) |
Modifier and Type | Method and Description |
---|---|
void |
addUsedVariables(java.util.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(java.lang.Object other) |
org.jruby.util.ByteList |
getByteList() |
int |
getCodeRange() |
OperandType |
getOperandType() |
java.lang.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).
|
java.lang.Object |
retrieve(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
java.lang.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, java.lang.String file, int line)
protected StringLiteral(java.lang.String string, org.jruby.util.ByteList bytelist, int coderange, java.lang.String file, int line)
public StringLiteral(java.lang.String s)
public StringLiteral(RubySymbol symbol)
public OperandType getOperandType()
getOperandType
in class Operand
public boolean hasKnownValue()
Operand
hasKnownValue
in class Operand
public void addUsedVariables(java.util.List<Variable> l)
Operand
addUsedVariables
in class Operand
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Operand cloneForInlining(CloneInfo ii)
cloneForInlining
in class Operand
public java.lang.Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
public org.jruby.util.ByteList getByteList()
public java.lang.String getString()
getString
in interface Stringable
public void encode(IRWriterEncoder e)
public static StringLiteral decode(IRReaderDecoder d)
public int getCodeRange()
Copyright © 2001-2018 JRuby. All Rights Reserved.