Class UnboxedFloat


public class UnboxedFloat extends ImmutableLiteral
  • Field Details

    • value

      public final double value
  • Constructor Details

    • UnboxedFloat

      public UnboxedFloat(double value)
  • Method Details

    • getOperandType

      public OperandType getOperandType()
      Specified by:
      getOperandType in class Operand
    • 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 class ImmutableLiteral
      Returns:
      true if a known compile-time value.
    • createCacheObject

      public Object createCacheObject(ThreadContext context)
      Description copied from class: ImmutableLiteral
      Implementing class is responsible for constructing the cached value.
      Specified by:
      createCacheObject in class ImmutableLiteral
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • visit

      public void visit(IRVisitor visitor)
      Overrides:
      visit in class Operand
    • 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 class Operand
      Returns: