org.jikesrvm.compilers.opt.ir.operand
Class HeapOperand<T>

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.operand.Operand
      extended by org.jikesrvm.compilers.opt.ir.operand.HeapOperand<T>

public final class HeapOperand<T>
extends Operand

Represents a heap variable for instructions in Heap Array SSA form.

See Also:
Operand, HeapVariable

Field Summary
 HeapVariable<T> value
          The heap variable corresponding to this operand.
 
Fields inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand
instruction
 
Constructor Summary
HeapOperand(HeapVariable<T> heap)
          Construct an operand corresponding to a heap variable.
 
Method Summary
 HeapOperand<T> copy()
          Construct a new heap operand associated with the same heap variable as this operand
 T getHeapType()
          Return the type corresponding to the heap variable associated with this operand.
 HeapVariable<T> getHeapVariable()
          Return the heap variable corresponding to this operand.
 Instruction getInstruction()
          Return the instruction associated with this operand.
 int getNumber()
          Return the number of the heap variable corresponding to this operand.
 void setInstruction(Instruction s)
          Associate this operand with a given instruction.
 boolean similar(Operand op)
          Does this operand correspond to the same heap variable as another heap operand?
 String toString()
          Return a 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, getType, isAddress, isAddressConstant, isBlock, isBranch, isClassConstant, isConstant, isDefinitelyNull, isDouble, 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 final HeapVariable<T> value
The heap variable corresponding to this operand.

Constructor Detail

HeapOperand

public HeapOperand(HeapVariable<T> heap)
Construct an operand corresponding to a heap variable.

Parameters:
heap - the heap variable corresponding to this operand.
Method Detail

getHeapVariable

public HeapVariable<T> getHeapVariable()
Return the heap variable corresponding to this operand.

Returns:
the heap variable corresponding to this operand.

getNumber

public int getNumber()
Return the number of the heap variable corresponding to this operand.

Returns:
the number of the heap variable corresponding to this operand.

getHeapType

public T getHeapType()
Return the type corresponding to the heap variable associated with this operand.

Returns:
the type corresponding to the heap variable associated with this operand.

copy

public HeapOperand<T> copy()
Construct a new heap operand associated with the same heap variable as this operand

Specified by:
copy in class Operand
Returns:
a new heap operand associated with the same heap variable as this operand

similar

public boolean similar(Operand op)
Does this operand correspond to the same heap variable as another heap operand?

Specified by:
similar in class Operand
Parameters:
op - the second operand to compare with
Returns:
true or false

toString

public String toString()
Return a string representation of this operand.

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

setInstruction

public void setInstruction(Instruction s)
Associate this operand with a given instruction.

Parameters:
s - the associated instruction

getInstruction

public Instruction getInstruction()
Return the instruction associated with this operand.

Returns:
the instruction associated with this operand.