Top Fields Constructors Methods
org.jruby.ir.operands

public Class UnboxedFloat

extends ImmutableLiteral
Class Inheritance
Imports
org.jruby.ir.IRVisitor, org.jruby.runtime.ThreadContext

Field Summary

Modifier and TypeField and Description
public final double

Constructor Summary

AccessConstructor and Description
public
UnboxedFloat(double value)

Method Summary

Modifier and TypeMethod and Description
public Object
createCacheObject(ThreadContext context)

Implements abstract org.jruby.ir.operands.ImmutableLiteral.createCacheObject.

Implementing class is responsible for constructing the cached value.

public OperandType
public double
public boolean
hasKnownValue()

Overrides org.jruby.ir.operands.ImmutableLiteral.hasKnownValue.

Do we know the value of this operand at compile-time?

public boolean
isTruthyImmediate()

Overrides org.jruby.ir.operands.Operand.isTruthyImmediate.

Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
Inherited from org.jruby.ir.operands.ImmutableLiteral:
addUsedVariablescachedObjectcanCopyPropagatecloneForInliningisCachedretrieve

Field Detail

valueback to summary
public final double value

Constructor Detail

UnboxedFloatback to summary
public UnboxedFloat(double value)

Method Detail

createCacheObjectback to summary
public Object createCacheObject(ThreadContext context)

Implements abstract org.jruby.ir.operands.ImmutableLiteral.createCacheObject.

Doc from org.jruby.ir.operands.ImmutableLiteral.createCacheObject.

Implementing class is responsible for constructing the cached value.

Annotations
@Override
getOperandTypeback to summary
public OperandType getOperandType()

Implements abstract org.jruby.ir.operands.Operand.getOperandType.

Annotations
@Override
getValueback to summary
public double getValue()
hasKnownValueback to summary
public boolean hasKnownValue()

Overrides org.jruby.ir.operands.ImmutableLiteral.hasKnownValue.

Doc from org.jruby.ir.operands.Operand.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).

Returns:boolean

true if a known compile-time value.

Annotations
@Override
isTruthyImmediateback to summary
public boolean isTruthyImmediate()

Overrides org.jruby.ir.operands.Operand.isTruthyImmediate.

Doc from org.jruby.ir.operands.Operand.isTruthyImmediate.

Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
visitback to summary
public void visit(IRVisitor visitor)

Overrides org.jruby.ir.operands.Operand.visit.

Annotations
@Override