cetus.hir
Class UnaryOperator

java.lang.Object
  extended by cetus.hir.UnaryOperator
All Implemented Interfaces:
Printable

public class UnaryOperator
extends java.lang.Object
implements Printable

Operators that act on a single expression.


Field Summary
static UnaryOperator ADDRESS_OF
          &
static UnaryOperator BITWISE_COMPLEMENT
          ~
static UnaryOperator DEREFERENCE
          *
static UnaryOperator LOGICAL_NEGATION
          !
static UnaryOperator MINUS
          -
static UnaryOperator PLUS
          +
static UnaryOperator POST_DECREMENT
          --
static UnaryOperator POST_INCREMENT
          ++
static UnaryOperator PRE_DECREMENT
          --
static UnaryOperator PRE_INCREMENT
          ++
protected  int value
           
 
Method Summary
static UnaryOperator fromString(java.lang.String s)
           
static boolean hasSideEffects(UnaryOperator op)
           
 void print(java.io.OutputStream stream)
          Print the code for the IR represented by the object.
 java.lang.String toString()
           
 void verify()
          Verifies this operator is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDRESS_OF

public static final UnaryOperator ADDRESS_OF
&


BITWISE_COMPLEMENT

public static final UnaryOperator BITWISE_COMPLEMENT
~


DEREFERENCE

public static final UnaryOperator DEREFERENCE
*


LOGICAL_NEGATION

public static final UnaryOperator LOGICAL_NEGATION
!


MINUS

public static final UnaryOperator MINUS
-


PLUS

public static final UnaryOperator PLUS
+


POST_DECREMENT

public static final UnaryOperator POST_DECREMENT
--


POST_INCREMENT

public static final UnaryOperator POST_INCREMENT
++


PRE_DECREMENT

public static final UnaryOperator PRE_DECREMENT
--


PRE_INCREMENT

public static final UnaryOperator PRE_INCREMENT
++


value

protected int value
Method Detail

fromString

public static UnaryOperator fromString(java.lang.String s)

hasSideEffects

public static boolean hasSideEffects(UnaryOperator op)

print

public void print(java.io.OutputStream stream)
Description copied from interface: Printable
Print the code for the IR represented by the object. Always calls object_print_method(this, stream). If the object's print method is null, nothing is printed; this provides an easy mechanism to temporarily hide something.

Specified by:
print in interface Printable
Parameters:
stream - The stream on which to print the data.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

verify

public void verify()
            throws java.lang.IllegalStateException
Verifies this operator is valid.

Throws:
java.lang.IllegalStateException - if the operator is invalid.