coins.ffront
Class UnaryNode

java.lang.Object
  extended bycoins.ffront.UnaryNode
All Implemented Interfaces:
HasConstValue, Node

public class UnaryNode
extends java.lang.Object
implements Node, HasConstValue


Field Summary
(package private)  Node exp
           
(package private)  FirToHir fHir
           
(package private)  int op
           
 
Constructor Summary
UnaryNode(int op, Node pExp, FirToHir pfHir)
           
 
Method Summary
 FNumber getConstValue()
           
 Node getExp()
           
 int getOp()
           
 Exp makeArgAddr(FStmt pCallStmt)
          Make HIR Exp node from this expression as a call-by-address parameter in pCallStmt.
 Exp makeExp()
          Make HIR Exp node of this unary expression.
 java.lang.String opString()
           
 void print(int level, java.lang.String spaces)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fHir

FirToHir fHir

op

int op

exp

Node exp
Constructor Detail

UnaryNode

public UnaryNode(int op,
                 Node pExp,
                 FirToHir pfHir)
Method Detail

getOp

public int getOp()

getExp

public Node getExp()

print

public void print(int level,
                  java.lang.String spaces)
Specified by:
print in interface Node

toString

public java.lang.String toString()
Specified by:
toString in interface Node

opString

public java.lang.String opString()

makeExp

public Exp makeExp()
Make HIR Exp node of this unary expression. In case of complex expression make a special ComplexExp node which is composed of a real part expression node and an imaginary part expression node.

Specified by:
makeExp in interface Node
Returns:
HIR Exp.

makeArgAddr

public Exp makeArgAddr(FStmt pCallStmt)
Make HIR Exp node from this expression as a call-by-address parameter in pCallStmt.

Specified by:
makeArgAddr in interface Node
Parameters:
pCallStmt - a call statement or a function call expression
Returns:
HIR Exp node.

getConstValue

public FNumber getConstValue()
Specified by:
getConstValue in interface HasConstValue