public class Symbol extends ImmutableLiteral implements Stringable
| Modifier and Type | Field and Description |
|---|---|
static Symbol |
KW_REST_ARG_DUMMY |
EMPTY_ARRAY| Constructor and Description |
|---|
Symbol(RubySymbol symbol) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCopyPropagate()
Can we replace every use of a variable 'v' that contains the value of this operand
with the operand itself? This takes importance when there are at least two uses
of 'v' within this scope.
|
java.lang.Object |
createCacheObject(ThreadContext context)
Implementing class is responsible for constructing the cached value.
|
static Symbol |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
boolean |
equals(java.lang.Object other) |
ByteList |
getBytes() |
org.jcodings.Encoding |
getEncoding() |
OperandType |
getOperandType() |
java.lang.String |
getString() |
RubySymbol |
getSymbol() |
boolean |
isTruthyImmediate()
Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)
|
java.lang.String |
toString() |
void |
visit(IRVisitor visitor) |
addUsedVariables, cachedObject, cloneForInlining, hasKnownValue, isCached, retrievegetSimplifiedOperand, getValue, isFalseyImmediatepublic static final Symbol KW_REST_ARG_DUMMY
public Symbol(RubySymbol symbol)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic OperandType getOperandType()
getOperandType in class Operandpublic ByteList getBytes()
public RubySymbol getSymbol()
public java.lang.String getString()
getString in interface Stringablepublic java.lang.Object createCacheObject(ThreadContext context)
ImmutableLiteralcreateCacheObject in class ImmutableLiteralpublic boolean canCopyPropagate()
OperandcanCopyPropagate in class ImmutableLiteralpublic org.jcodings.Encoding getEncoding()
public java.lang.String toString()
toString in class java.lang.Objectpublic void encode(IRWriterEncoder e)
public static Symbol decode(IRReaderDecoder d)
public boolean isTruthyImmediate()
OperandisTruthyImmediate in class OperandCopyright © 2001-2022 JRuby. All Rights Reserved.