joeq.Compiler.Quad
Class Quad

java.lang.Object
  extended by joeq.Compiler.Quad.Quad

public class Quad
extends java.lang.Object

Version:
$Id: Quad.java,v 1.31 2005/05/05 19:38:13 joewhaley Exp $
Author:
John Whaley

Field Summary
static boolean DETERMINISTIC
           
 
Method Summary
 void accept(QuadVisitor qv)
          Accepts a quad visitor to this quad.
 Quad copy(int id_number)
           
 boolean equals(java.lang.Object that)
           
 UnmodifiableList.Operand getAllOperands()
           
 java.util.List<Operand.RegisterOperand> getDefinedRegisters()
          Returns a list of the registers defined by this quad.
 int getID()
          Returns the id number of this quad.
 Operator getOperator()
          Return the operator for this quad.
 java.util.List<jq_Class> getThrownExceptions()
          Returns a list of the types of exceptions that this quad can throw.
 java.util.List<Operand.RegisterOperand> getUsedRegisters()
          Returns a list of the registers used by this quad.
 int hashCode()
           
 void interpret(QuadInterpreter s)
          Interprets this quad, modifying the given interpreter state.
 void setOp1(Operand op)
           
 void setOp2(Operand op)
           
 void setOp3(Operand op)
           
 void setOp4(Operand op)
           
 java.lang.String toString_short()
          Returns a short string representation of this quad, without any operands.
 java.lang.String toString()
          Returns a string representation of this quad.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DETERMINISTIC

public static final boolean DETERMINISTIC
See Also:
Constant Field Values
Method Detail

setOp1

public void setOp1(Operand op)

setOp2

public void setOp2(Operand op)

setOp3

public void setOp3(Operand op)

setOp4

public void setOp4(Operand op)

copy

public Quad copy(int id_number)

getAllOperands

public UnmodifiableList.Operand getAllOperands()

getOperator

public Operator getOperator()
Return the operator for this quad.


accept

public void accept(QuadVisitor qv)
Accepts a quad visitor to this quad. For the visitor pattern.


getID

public int getID()
Returns the id number of this quad. THIS NUMBER HOLDS NO MEANING WHATSOEVER. It is just used for printing.


getThrownExceptions

public java.util.List<jq_Class> getThrownExceptions()
Returns a list of the types of exceptions that this quad can throw. Note that types in this list are not exact, therefore subtypes of the returned types may also be thrown.


getDefinedRegisters

public java.util.List<Operand.RegisterOperand> getDefinedRegisters()
Returns a list of the registers defined by this quad.


getUsedRegisters

public java.util.List<Operand.RegisterOperand> getUsedRegisters()
Returns a list of the registers used by this quad.


interpret

public void interpret(QuadInterpreter s)
Interprets this quad, modifying the given interpreter state.


toString

public java.lang.String toString()
Returns a string representation of this quad.

Overrides:
toString in class java.lang.Object

toString_short

public java.lang.String toString_short()
Returns a short string representation of this quad, without any operands.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object