All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.QuadSSA.OPER

java.lang.Object
   |
   +----harpoon.IR.QuadSSA.Quad
           |
           +----harpoon.IR.QuadSSA.OPER

public class OPER
extends Quad
OPER objects represent arithmetic/logical operations, including mathematical operators such as add and subtract, conversion operators such as double-to-int, and comparison operators such as greater than and equals.

OPER quads never throw exceptions. Any exception thrown implicitly by the java bytecode opcode corresponding to an OPER is rewritten as an explicit test and throw in the Quad IR.

Version:
$Id: OPER.java,v 1.21 1998/11/11 05:06:23 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Variable Index

 o dst
The temp in which to store the result of the operation.
 o opcode
The operation to be performed, from the Qop class.
 o operands
Operands of the operation, in left-to-right order.

Constructor Index

 o OPER(HCodeElement, int, Temp, Temp[])
Creates a OPER.
 o OPER(HCodeElement, String, Temp, Temp[])
Backwards-compatibility.

Method Index

 o clone()
Properly clone operands[] array.
 o def()
Returns the Temps defined by this OPER.
 o evalType()
Determines the result type of an OPER.
 o evalValue(Object[])
Evaluates a constant value for the result of an OPER, given constant values for the operands.
 o renameDefs(TempMap)
Rename all defined variables in this Quad according to a mapping.
 o renameUses(TempMap)
Rename all used variables in this Quad according to a mapping.
 o toString()
Returns a human-readable representation of this Quad.
 o use()
Returns the Temps used by this OPER.
 o visit(OperVisitor)
 o visit(QuadVisitor)
Accept a visitor.

Variables

 o dst
 public Temp dst
The temp in which to store the result of the operation.

 o opcode
 public int opcode
The operation to be performed, from the Qop class.

 o operands
 public Temp operands[]
Operands of the operation, in left-to-right order.

Constructors

 o OPER
 public OPER(HCodeElement source,
             int opcode,
             Temp dst,
             Temp operands[])
Creates a OPER.

 o OPER
 public OPER(HCodeElement source,
             String opcode,
             Temp dst,
             Temp operands[])
Backwards-compatibility.

Methods

 o use
 public Temp[] use()
Returns the Temps used by this OPER.

Overrides:
use in class Quad
 o def
 public Temp[] def()
Returns the Temps defined by this OPER.

Overrides:
def in class Quad
 o renameUses
 public void renameUses(TempMap tm)
Rename all used variables in this Quad according to a mapping.

Overrides:
renameUses in class Quad
 o renameDefs
 public void renameDefs(TempMap tm)
Rename all defined variables in this Quad according to a mapping.

Overrides:
renameDefs in class Quad
 o clone
 public Object clone()
Properly clone operands[] array.

Overrides:
clone in class Quad
 o visit
 public void visit(QuadVisitor v)
Accept a visitor.

Overrides:
visit in class Quad
 o visit
 public void visit(OperVisitor v)
 o toString
 public String toString()
Returns a human-readable representation of this Quad.

Overrides:
toString in class Quad
 o evalType
 public HClass evalType()
Determines the result type of an OPER.

 o evalValue
 public Object evalValue(Object opValues[])
Evaluates a constant value for the result of an OPER, given constant values for the operands.


All Packages  Class Hierarchy  This Package  Previous  Next  Index