at.dms.backend
Class QQuadruple

java.lang.Object
  |
  +--at.dms.backend.QNode
        |
        +--at.dms.backend.QQuadruple
All Implemented Interfaces:
QOrigin

class QQuadruple
extends QNode
implements QOrigin

This class represents a quadruple: a source and a destinationination.


Constructor Summary
QQuadruple(QDestination destination, QOrigin origin)
           
 
Method Summary
static QTemporary[] buildQuadruples(MethodEnv env, BasicBlock block, InstructionHandle[] instructions, QTemporary[] entryStack, java.util.List list)
          Builds the quadruple list.
 QOrigin duplicate()
          Duplicate this node: not implemented.
 void generate(CodeSequence seq)
          Generates instructions for this quadruple.
 QTemporary getDef()
          Returns the defined temporary.
 QOrigin[] getOrigins()
          returns the parameters of this instruction
 QQuadruple getStore()
          Returns this node.
 int getType()
          The type of this instruction.
 QTemporary[] getUses()
          Returns the used temporaries.
 boolean isStore()
          isStore
 void setOrigin(QOrigin origin, int i)
          Sets the parameters of this instruction.
 java.lang.String toString()
          Human readable form.
 void useStack()
          Uses the stack instead of a local var.
 
Methods inherited from class at.dms.backend.QNode
getInstruction, getJump, getLivein, getLiveout, getSwitch, hasSideEffect, isJump, isLive, isSwitch, setLivein, setLiveout
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface at.dms.backend.QOrigin
getInstruction
 

Constructor Detail

QQuadruple

public QQuadruple(QDestination destination,
                  QOrigin origin)
Method Detail

isStore

public boolean isStore()
isStore
Overrides:
isStore in class QNode

getStore

public QQuadruple getStore()
Returns this node.
Overrides:
getStore in class QNode

toString

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

getType

public int getType()
The type of this instruction.
Specified by:
getType in interface QOrigin

duplicate

public QOrigin duplicate()
Duplicate this node: not implemented.
Specified by:
duplicate in interface QOrigin

useStack

public void useStack()
Uses the stack instead of a local var.

getOrigins

public QOrigin[] getOrigins()
returns the parameters of this instruction
Specified by:
getOrigins in interface QOrigin
Overrides:
getOrigins in class QNode

setOrigin

public void setOrigin(QOrigin origin,
                      int i)
Sets the parameters of this instruction.
Specified by:
setOrigin in interface QOrigin
Overrides:
setOrigin in class QNode

getDef

public QTemporary getDef()
Returns the defined temporary.
Overrides:
getDef in class QNode

getUses

public QTemporary[] getUses()
Returns the used temporaries.
Specified by:
getUses in interface QOrigin
Overrides:
getUses in class QNode

generate

public void generate(CodeSequence seq)
Generates instructions for this quadruple.
Specified by:
generate in interface QOrigin
Overrides:
generate in class QNode
Parameters:
seq - The code sequence of instruction.

buildQuadruples

public static QTemporary[] buildQuadruples(MethodEnv env,
                                           BasicBlock block,
                                           InstructionHandle[] instructions,
                                           QTemporary[] entryStack,
                                           java.util.List list)
Builds the quadruple list.
Parameters:
instructions - The list of instructions.
entryStack - The stack in entry.
list - A place holder for quadruples.
Returns:
The stack at the end of this basic block