Package org.jruby.ir.operands
Class UnboxedFloat
java.lang.Object
org.jruby.ir.operands.Operand
org.jruby.ir.operands.ImmutableLiteral
org.jruby.ir.operands.UnboxedFloat
-
Field Summary
FieldsFields inherited from class org.jruby.ir.operands.Operand
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCacheObject
(ThreadContext context) Implementing class is responsible for constructing the cached value.double
getValue()
boolean
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).boolean
Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)toString()
void
Methods inherited from class org.jruby.ir.operands.ImmutableLiteral
addUsedVariables, cachedObject, canCopyPropagate, cloneForInlining, isCached, retrieve
Methods inherited from class org.jruby.ir.operands.Operand
encode, getSimplifiedOperand, getValue, isFalseyImmediate
-
Field Details
-
value
public final double value
-
-
Constructor Details
-
UnboxedFloat
public UnboxedFloat(double value)
-
-
Method Details
-
getOperandType
- Specified by:
getOperandType
in classOperand
-
hasKnownValue
public boolean hasKnownValue()Description copied from class:Operand
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).- Overrides:
hasKnownValue
in classImmutableLiteral
- Returns:
- true if a known compile-time value.
-
createCacheObject
Description copied from class:ImmutableLiteral
Implementing class is responsible for constructing the cached value.- Specified by:
createCacheObject
in classImmutableLiteral
-
toString
-
visit
-
getValue
public double getValue() -
isTruthyImmediate
public boolean isTruthyImmediate()Description copied from class:Operand
Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)- Overrides:
isTruthyImmediate
in classOperand
- Returns:
-