public class Rational extends ImmutableLiteral
EMPTY_ARRAY
Constructor and Description |
---|
Rational(ImmutableLiteral numerator,
ImmutableLiteral denominator) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
createCacheObject(ThreadContext context)
Implementing class is responsible for constructing the cached value.
|
static Rational |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
ImmutableLiteral |
getDenominator() |
ImmutableLiteral |
getNumerator() |
OperandType |
getOperandType() |
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, canCopyPropagate, cloneForInlining, hasKnownValue, isCached, retrieve
getSimplifiedOperand, getValue, isFalseyImmediate
public Rational(ImmutableLiteral numerator, ImmutableLiteral denominator)
public OperandType getOperandType()
getOperandType
in class Operand
public java.lang.Object createCacheObject(ThreadContext context)
ImmutableLiteral
createCacheObject
in class ImmutableLiteral
public void encode(IRWriterEncoder e)
public static Rational decode(IRReaderDecoder d)
public java.lang.String toString()
toString
in class java.lang.Object
public ImmutableLiteral getNumerator()
public ImmutableLiteral getDenominator()
public boolean isTruthyImmediate()
Operand
isTruthyImmediate
in class Operand
Copyright © 2001-2020 JRuby. All Rights Reserved.