cfg
Class UnaryNotInst

java.lang.Object
  extended by cfg.TACInst
      extended by cfg.UnaryInst
          extended by cfg.UnaryNotInst

public class UnaryNotInst
extends UnaryInst

A class representing a three-address code unary boolean not (complement) instruction (UnaryNotInst). A unary not instruction consists of a destination variable and a source variable (inherited from UnaryInst). From TACInst it also inherits an opcode (UNNOT).

Author:
Marc Corliss and Lori Pietraszek

Field Summary
 
Fields inherited from class cfg.UnaryInst
destination, source
 
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
UnaryNotInst(java.lang.String destination, java.lang.String source)
          UnaryNotInst constructor
 
Method Summary
<ReturnType,ArgumentType>
ReturnType
accept(TACInstVisitor<ReturnType,ArgumentType> visitor, ArgumentType o)
          Abstract visitor method.
 void setSource(java.lang.String source)
          Set the soure operand
 
Methods inherited from class cfg.UnaryInst
equals, getDestination, getSource, 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

UnaryNotInst

public UnaryNotInst(java.lang.String destination,
                    java.lang.String source)
UnaryNotInst constructor

Parameters:
destination - destination variable
source - source variable
Method Detail

setSource

public void setSource(java.lang.String source)
Set the soure operand

Specified by:
setSource in class UnaryInst
Parameters:
source - new 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.