org.jikesrvm.compilers.opt.ir.operand
Class DoubleConstantOperand

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.operand.Operand
      extended by org.jikesrvm.compilers.opt.ir.operand.ConstantOperand
          extended by org.jikesrvm.compilers.opt.ir.operand.DoubleConstantOperand
All Implemented Interfaces:
SizeConstants

public final class DoubleConstantOperand
extends ConstantOperand
implements SizeConstants

Represents a constant double operand.

See Also:
Operand

Field Summary
 Offset offset
          Offset in JTOC where this double constant lives. (0 for constants obtained from constant folding)
 double value
          Value of this operand.
 
Fields inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand
instruction
 
Fields inherited from interface org.jikesrvm.SizeConstants
BITS_IN_ADDRESS, BITS_IN_BOOLEAN, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_DOUBLE, BITS_IN_EXTENT, BITS_IN_FLOAT, BITS_IN_INT, BITS_IN_LONG, BITS_IN_OFFSET, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BOOLEAN, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_DOUBLE, BYTES_IN_EXTENT, BYTES_IN_FLOAT, BYTES_IN_INT, BYTES_IN_LONG, BYTES_IN_OFFSET, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BOOLEAN, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_DOUBLE, LOG_BITS_IN_EXTENT, LOG_BITS_IN_FLOAT, LOG_BITS_IN_INT, LOG_BITS_IN_LONG, LOG_BITS_IN_OFFSET, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_BOOLEAN, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_DOUBLE, LOG_BYTES_IN_EXTENT, LOG_BYTES_IN_FLOAT, LOG_BYTES_IN_INT, LOG_BYTES_IN_LONG, LOG_BYTES_IN_OFFSET, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD
 
Constructor Summary
DoubleConstantOperand(double v)
          Constructs a new double constant operand with the specified value.
DoubleConstantOperand(double v, Offset i)
          Constructs a new double constant operand with the specified value and JTOC offset.
 
Method Summary
 Operand copy()
          Return a new operand that is semantically equivalent to this.
 TypeReference getType()
          Return the TypeReference of the value represented by the operand.
 boolean isDouble()
          Does the operand represent a value of the double data type?
 boolean similar(Operand op)
          Are two operands semantically equivalent?
 String toString()
          Returns the string representation of this operand.
 
Methods inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand
asAddressConstant, asBlock, asBranch, asClassConstant, asCondition, asDoubleConstant, asFloatConstant, asIntConstant, asLocation, asLongConstant, asMemory, asMethod, asNullConstant, asObjectConstant, asRegister, asStackLocation, asStringConstant, asTIBConstant, asType, conservativelyApproximates, getIndexInInstruction, isAddress, isAddressConstant, isBlock, isBranch, isClassConstant, isConstant, isDefinitelyNull, isDoubleConstant, isFloat, isFloatConstant, isInt, isIntConstant, isIntLike, isLocation, isLong, isLongConstant, isMemory, isMethod, isMovableObjectConstant, isNullConstant, isObjectConstant, isRef, isRegister, isStackLocation, isStringConstant, isTIBConstant, isTrueGuard, isType, meet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public double value
Value of this operand.


offset

public Offset offset
Offset in JTOC where this double constant lives. (0 for constants obtained from constant folding)

Constructor Detail

DoubleConstantOperand

public DoubleConstantOperand(double v)
Constructs a new double constant operand with the specified value.

Parameters:
v - value

DoubleConstantOperand

public DoubleConstantOperand(double v,
                             Offset i)
Constructs a new double constant operand with the specified value and JTOC offset.

Parameters:
v - value
i - offset in the jtoc
Method Detail

copy

public Operand copy()
Description copied from class: Operand
Return a new operand that is semantically equivalent to this.

Specified by:
copy in class Operand
Returns:
a copy of this

getType

public TypeReference getType()
Description copied from class: Operand
Return the TypeReference of the value represented by the operand.

Overrides:
getType in class Operand
Returns:
TypeReference.Double

isDouble

public boolean isDouble()
Description copied from class: Operand
Does the operand represent a value of the double data type?

Overrides:
isDouble in class Operand
Returns:
true

similar

public boolean similar(Operand op)
Description copied from class: Operand
Are two operands semantically equivalent?

Specified by:
similar in class Operand
Parameters:
op - other operand
Returns:
true if this and op are semantically equivalent or false if they are not.

toString

public String toString()
Returns the string representation of this operand.

Overrides:
toString in class Object
Returns:
a string representation of this operand.