cfg
Class BinaryModInst

java.lang.Object
  extended by cfg.TACInst
      extended by cfg.BinaryInst
          extended by cfg.BinaryModInst

public class BinaryModInst
extends BinaryInst

A class representing a three-address code binary integer modulus instruction (BinaryModInst). A binary modulus instruction consists of a destination variable a left source operand (inherited from BinaryInst) and a right source operand (inherited from BinaryInst). From TACInst it also inherits an opcode (BINMOD).

Author:
Marc Corliss and Lori Pietraszek

Field Summary
 
Fields inherited from class cfg.BinaryInst
destination, leftSource, rightSource
 
Fields inherited from class cfg.TACInst
BINADD, BINAND, BINDIV, BINMOD, BINMUL, BINOR, BINSUB, comments, DIRCALL, ERRPARAM, IF, INDIRCALL, LDADDR, LDCONST, LDENTRY, LDVAR, NUM_INSN_TYPES, opcode, PHI, REFPARAM, RETN, STDPARAM, STENTRY, UNNEG, UNNOT
 
Constructor Summary
BinaryModInst(java.lang.String destination, java.lang.String leftSource, java.lang.String rightSource)
          BinaryModInst constructor
 
Method Summary
<ReturnType,ArgumentType>
ReturnType
accept(TACInstVisitor<ReturnType,ArgumentType> visitor, ArgumentType o)
          Abstract visitor method.
 void setLeftSource(java.lang.String leftSource)
          Set the left soure operand
 void setRightSource(java.lang.String rightSource)
          Set the right soure operand
 
Methods inherited from class cfg.BinaryInst
equals, getDestination, getLeftSource, getRightSource, getString, setDestination
 
Methods inherited from class cfg.TACInst
addComment, checkBoolConst, checkConst, checkIntConst, checkLabel, checkStrConst, checkVar, getBinaryOpcode, getComments, getOp, getOpcode, getUnaryOpcode, isBinary, isCall, isIf, isLoad, isParam, isReturn, isStore, isUnary, isValidID, removeComments, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryModInst

public BinaryModInst(java.lang.String destination,
                     java.lang.String leftSource,
                     java.lang.String rightSource)
BinaryModInst constructor

Parameters:
destination - destination variable
leftSource - left source variable
rightSource - right source variable
Method Detail

setLeftSource

public void setLeftSource(java.lang.String leftSource)
Set the left soure operand

Specified by:
setLeftSource in class BinaryInst
Parameters:
leftSource - new left source operand

setRightSource

public void setRightSource(java.lang.String rightSource)
Set the right soure operand

Specified by:
setRightSource in class BinaryInst
Parameters:
rightSource - new right source operand

accept

public <ReturnType,ArgumentType> ReturnType accept(TACInstVisitor<ReturnType,ArgumentType> visitor,
                                                   ArgumentType o)
Description copied from class: TACInst
Abstract visitor method.

Specified by:
accept in class TACInst
Parameters:
visitor - TACInstVisitor.
o - Data to pass down.
Returns:
return value of visitor.