at.dms.backend
Class QTemporary

java.lang.Object
  |
  +--at.dms.backend.QOperand
        |
        +--at.dms.backend.QTemporary
All Implemented Interfaces:
QDestination, QOrigin
Direct Known Subclasses:
QStack, QVariable

class QTemporary
extends QOperand
implements QDestination

This class represents a temporary.


Field Summary
static QTemporary[] EMPTY
          An empty array of temporaries.
static int UNINITIALIZED
          Constant for UNINITIALIZED.
static int UNUSED
          Constant for UNUSED.
 
Constructor Summary
(package private) QTemporary(int type)
           
(package private) QTemporary(int type, int precolor)
           
 
Method Summary
 void def(BasicBlock block, int pos)
          Defines? a temporary.
 QOrigin duplicate()
          Duplicate this node.
 void enforceColor()
          Enforces the precolor.
 void generate(CodeSequence seq)
          Generates instructions for this quadruple.
 QTemporary getDef()
          Returns the defined temporary.
 int getPosition()
          Gets position.
 int getPrecolor()
          Returns the pre-color of this temporary.
 int getRegister()
          Returns the register number of this temporary.
 int getSize()
          Returns the size (the number of slot) of this temporary.
 int getType()
          The type of the temporary.
 int getUseCount()
          Returns the number of uses.
 QTemporary[] getUses()
          Returns the used temporaries.
 void setPosition(int pos)
          Sets position.
 void setRegister(int reg)
          ???
 void store(CodeSequence seq, boolean isLive)
          Generates instructions for storing.
 java.lang.String toString()
          Human readable form.
 void use(BasicBlock block, int pos)
          Uses a temporary.
 
Methods inherited from class at.dms.backend.QOperand
getInstruction, getOrigins, setOrigin
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNINITIALIZED

public static final int UNINITIALIZED
Constant for UNINITIALIZED.

UNUSED

public static final int UNUSED
Constant for UNUSED.

EMPTY

public static final QTemporary[] EMPTY
An empty array of temporaries.
Constructor Detail

QTemporary

QTemporary(int type)

QTemporary

QTemporary(int type,
           int precolor)
Method Detail

getDef

public QTemporary getDef()
Returns the defined temporary.
Specified by:
getDef in interface QDestination

getUses

public QTemporary[] getUses()
Returns the used temporaries.

getSize

public int getSize()
Returns the size (the number of slot) of this temporary.

getRegister

public int getRegister()
Returns the register number of this temporary.

getPrecolor

public int getPrecolor()
Returns the pre-color of this temporary.

enforceColor

public void enforceColor()
Enforces the precolor.

getType

public int getType()
The type of the temporary.
Overrides:
getType in class QOperand

toString

public java.lang.String toString()
Human readable form.
Overrides:
toString in class java.lang.Object

duplicate

public QOrigin duplicate()
Duplicate this node.

use

public void use(BasicBlock block,
                int pos)
Uses a temporary.

def

public void def(BasicBlock block,
                int pos)
Defines? a temporary.

getUseCount

public int getUseCount()
Returns the number of uses.

setPosition

public void setPosition(int pos)
Sets position.

getPosition

public int getPosition()
Gets position.

setRegister

public void setRegister(int reg)
???

generate

public void generate(CodeSequence seq)
Generates instructions for this quadruple.
Parameters:
seq - The code sequence of instruction.

store

public void store(CodeSequence seq,
                  boolean isLive)
Generates instructions for storing.
Specified by:
store in interface QDestination
Parameters:
seq - The code sequence of instruction.