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>
-
dst
- The temp in which to store the result of the operation.
-
opcode
- The operation to be performed, from the
Qop
class.
-
operands
- Operands of the operation, in left-to-right order.
-
OPER(HCodeElement, int, Temp, Temp[])
- Creates a
OPER
.
-
OPER(HCodeElement, String, Temp, Temp[])
- Backwards-compatibility.
-
clone()
- Properly clone
operands[]
array.
-
def()
- Returns the Temps defined by this OPER.
-
evalType()
- Determines the result type of an
OPER
.
-
evalValue(Object[])
- Evaluates a constant value for the result of an
OPER
,
given constant values for the operands.
-
renameDefs(TempMap)
- Rename all defined variables in this Quad according to a mapping.
-
renameUses(TempMap)
- Rename all used variables in this Quad according to a mapping.
-
toString()
- Returns a human-readable representation of this Quad.
-
use()
- Returns the Temps used by this OPER.
-
visit(OperVisitor)
-
-
visit(QuadVisitor)
- Accept a visitor.
dst
public Temp dst
- The temp in which to store the result of the operation.
opcode
public int opcode
- The operation to be performed, from the
Qop
class.
operands
public Temp operands[]
- Operands of the operation, in left-to-right order.
OPER
public OPER(HCodeElement source,
int opcode,
Temp dst,
Temp operands[])
- Creates a
OPER
.
OPER
public OPER(HCodeElement source,
String opcode,
Temp dst,
Temp operands[])
- Backwards-compatibility.
use
public Temp[] use()
- Returns the Temps used by this OPER.
- Overrides:
- use in class Quad
def
public Temp[] def()
- Returns the Temps defined by this OPER.
- Overrides:
- def in class Quad
renameUses
public void renameUses(TempMap tm)
- Rename all used variables in this Quad according to a mapping.
- Overrides:
- renameUses in class Quad
renameDefs
public void renameDefs(TempMap tm)
- Rename all defined variables in this Quad according to a mapping.
- Overrides:
- renameDefs in class Quad
clone
public Object clone()
- Properly clone
operands[]
array.
- Overrides:
- clone in class Quad
visit
public void visit(QuadVisitor v)
- Accept a visitor.
- Overrides:
- visit in class Quad
visit
public void visit(OperVisitor v)
toString
public String toString()
- Returns a human-readable representation of this Quad.
- Overrides:
- toString in class Quad
evalType
public HClass evalType()
- Determines the result type of an
OPER
.
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