IfThenElseSyntaxNode Class Reference

#include <include/hllcode.h>

Inheritance diagram for IfThenElseSyntaxNode:

SyntaxNode List of all members.

Detailed Description

Definition at line 281 of file hllcode.h.

Public Member Functions

virtual void addSuccessors (SyntaxNode *root, std::vector< SyntaxNode * > &successors)
virtual SyntaxNode * clone ()
virtual bool endsWithGoto ()
virtual int evaluate (SyntaxNode *root)
virtual SyntaxNode * findNodeFor (PBB bb)
virtual SyntaxNode * getEnclosingLoop (SyntaxNode *pFor, SyntaxNode *cur=NULL)
virtual int getNumOutEdges ()
virtual SyntaxNode * getOutEdge (SyntaxNode *root, int n)
 IfThenElseSyntaxNode ()
virtual bool isBranch ()
virtual bool isGoto ()
virtual void printAST (SyntaxNode *root, std::ostream &os)
virtual SyntaxNode * replace (SyntaxNode *from, SyntaxNode *to)
void setCond (Exp *e)
void setElse (SyntaxNode *n)
void setThen (SyntaxNode *n)
virtual ~IfThenElseSyntaxNode ()

Protected Attributes

Exp * cond
SyntaxNode * pElse
SyntaxNode * pThen


Constructor & Destructor Documentation

IfThenElseSyntaxNode::IfThenElseSyntaxNode (   ) 
 

Definition at line 475 of file syntax.cpp.

Referenced by clone().

IfThenElseSyntaxNode::~IfThenElseSyntaxNode (   )  [virtual]
 

Definition at line 480 of file syntax.cpp.

References pElse, and pThen.


Member Function Documentation

void IfThenElseSyntaxNode::addSuccessors (  SyntaxNode *  root,
std::vector< SyntaxNode * > &  successors
)  [virtual]
 

Reimplemented from SyntaxNode.

Definition at line 496 of file syntax.cpp.

References SyntaxNode::clone(), SyntaxNode::endsWithGoto(), SyntaxNode::getDepth(), SyntaxNode::getNumOutEdges(), SyntaxNode::ignoreGoto(), pThen, SyntaxNode::replace(), and SyntaxNode::setDepth().

SyntaxNode * IfThenElseSyntaxNode::clone (   )  [virtual]
 

Implements SyntaxNode.

Definition at line 528 of file syntax.cpp.

References SyntaxNode::clone(), Exp::clone(), cond, SyntaxNode::correspond, IfThenElseSyntaxNode(), SyntaxNode::pbb, pElse, and pThen.

virtual bool IfThenElseSyntaxNode::endsWithGoto (   )  [inline, virtual]
 

Implements SyntaxNode.

Definition at line 301 of file hllcode.h.

int IfThenElseSyntaxNode::evaluate (  SyntaxNode *  root  )  [virtual]
 

Implements SyntaxNode.

Definition at line 488 of file syntax.cpp.

References SyntaxNode::evaluate(), pElse, and pThen.

SyntaxNode * IfThenElseSyntaxNode::findNodeFor (  PBB  bb  )  [virtual]
 

Implements SyntaxNode.

Definition at line 555 of file syntax.cpp.

References SyntaxNode::findNodeFor(), NULL, SyntaxNode::pbb, pElse, and pThen.

virtual SyntaxNode* IfThenElseSyntaxNode::getEnclosingLoop (  SyntaxNode *  pFor,
SyntaxNode *  cur = NULL
)  [inline, virtual]
 

Implements SyntaxNode.

Definition at line 303 of file hllcode.h.

References SyntaxNode::getEnclosingLoop(), pElse, and pThen.

virtual int IfThenElseSyntaxNode::getNumOutEdges (   )  [inline, virtual]
 

Implements SyntaxNode.

Definition at line 293 of file hllcode.h.

virtual SyntaxNode* IfThenElseSyntaxNode::getOutEdge (  SyntaxNode *  root,
int  n
)  [inline, virtual]
 

Implements SyntaxNode.

Definition at line 296 of file hllcode.h.

References SyntaxNode::getOutEdge(), pElse, and pThen.

virtual bool IfThenElseSyntaxNode::isBranch (   )  [inline, virtual]
 

Reimplemented from SyntaxNode.

Definition at line 291 of file hllcode.h.

virtual bool IfThenElseSyntaxNode::isGoto (   )  [inline, virtual]
 

Reimplemented from SyntaxNode.

Definition at line 290 of file hllcode.h.

void IfThenElseSyntaxNode::printAST (  SyntaxNode *  root,
std::ostream &  os
)  [virtual]
 

Implements SyntaxNode.

Definition at line 565 of file syntax.cpp.

References cond, SyntaxNode::getNumber(), pElse, SyntaxNode::printAST(), and pThen.

SyntaxNode * IfThenElseSyntaxNode::replace (  SyntaxNode *  from,
SyntaxNode *  to
)  [virtual]
 

Implements SyntaxNode.

Definition at line 539 of file syntax.cpp.

References SyntaxNode::correspond, SyntaxNode::getCorrespond(), pThen, and to.

void IfThenElseSyntaxNode::setCond (  Exp *  e  )  [inline]
 

Definition at line 314 of file hllcode.h.

References cond.

void IfThenElseSyntaxNode::setElse (  SyntaxNode *  n  )  [inline]
 

Definition at line 316 of file hllcode.h.

References pElse.

void IfThenElseSyntaxNode::setThen (  SyntaxNode *  n  )  [inline]
 

Definition at line 315 of file hllcode.h.

References pThen.


Member Data Documentation

Exp* IfThenElseSyntaxNode::cond [protected]
 

Definition at line 285 of file hllcode.h.

Referenced by clone(), printAST(), and setCond().

SyntaxNode* IfThenElseSyntaxNode::pElse [protected]
 

Definition at line 284 of file hllcode.h.

Referenced by clone(), evaluate(), findNodeFor(), getEnclosingLoop(), getOutEdge(), printAST(), setElse(), and ~IfThenElseSyntaxNode().

SyntaxNode* IfThenElseSyntaxNode::pThen [protected]
 

Definition at line 283 of file hllcode.h.

Referenced by addSuccessors(), clone(), evaluate(), findNodeFor(), getEnclosingLoop(), getOutEdge(), printAST(), replace(), setThen(), and ~IfThenElseSyntaxNode().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:43 2006 for Boomerang by  doxygen 1.4.6