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

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.LongConstantOperand

public final class LongConstantOperand
extends ConstantOperand

Represents a constant long operand.

See Also:
Operand

Field Summary
 Offset offset
          Offset in JTOC where this long constant lives. (0 for constants obtained from constant folding) TODO is this field still necessary?
 long value
          Value of this operand.
static LongConstantOperand zero
          Constant 0, can be copied as convenient
 
Fields inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand
instruction
 
Constructor Summary
LongConstantOperand(long v)
          Constructs a new long constant operand with the specified value.
LongConstantOperand(long v, Offset i)
          Constructs a new long 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 isLong()
          Does the operand represent a value of the long data type?
 int lower32()
          Return the lower 32 bits (as an int) of value
 boolean similar(Operand op)
          Are two operands semantically equivalent?
 String toString()
          Returns the string representation of this operand.
 int upper32()
          Return the upper 32 bits (as an int) of value
 
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, isDouble, isDoubleConstant, isFloat, isFloatConstant, isInt, isIntConstant, isIntLike, isLocation, 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

zero

public static final LongConstantOperand zero
Constant 0, can be copied as convenient


value

public long value
Value of this operand.


offset

public Offset offset
Offset in JTOC where this long constant lives. (0 for constants obtained from constant folding) TODO is this field still necessary?

Constructor Detail

LongConstantOperand

public LongConstantOperand(long v)
Constructs a new long constant operand with the specified value.

Parameters:
v - value

LongConstantOperand

public LongConstantOperand(long v,
                           Offset i)
Constructs a new long constant operand with the specified value and JTOC offset. TODO is this constructor still necessary?

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

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.Long

isLong

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

Overrides:
isLong in class Operand
Returns:
true

lower32

public int lower32()
Return the lower 32 bits (as an int) of value


upper32

public int upper32()
Return the upper 32 bits (as an int) of value


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

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.