DefCollector Class Reference

#include <include/dataflow.h>

List of all members.


Detailed Description

DefCollector class.

This class collects all definitions that reach the statement that contains this collector.

Definition at line 145 of file dataflow.h.

Public Types

typedef AssignSet::iterator iterator

Public Member Functions

iterator begin ()
void clear ()
 DefCollector ()
 Constructor.
void dump ()
AssigndumpAddrOfFourth ()
iterator end ()
bool existsOnLeft (Exp *e)
ExpfindDefFor (Exp *e)
 Find the definition for a location.
void insert (Assign *a)
bool isInitialised ()
void makeCloneOf (DefCollector &other)
 makeCloneOf(): clone the given Collector into this one
void print (std::ostream &os, bool html=false)
char * prints ()
void searchReplaceAll (Exp *from, Exp *to, bool &change)
 Search and replace all occurrences.
void updateDefs (std::map< Exp *, std::stack< Statement * >, lessExpStar > &Stacks, UserProc *proc)

Private Attributes

AssignSet defs
 The set of definitions.
bool initialised


Member Typedef Documentation

typedef AssignSet::iterator DefCollector::iterator
 

Definition at line 195 of file dataflow.h.


Constructor & Destructor Documentation

DefCollector::DefCollector  )  [inline]
 

Constructor.

Definition at line 159 of file dataflow.h.


Member Function Documentation

iterator DefCollector::begin  )  [inline]
 

Definition at line 196 of file dataflow.h.

References AssignSet::begin(), and defs.

Referenced by CallStatement::accept(), ReturnStatement::accept(), makeCloneOf(), ReturnStatement::searchAndReplace(), CallStatement::searchAndReplace(), CallStatement::updateArguments(), and UsedLocsVisitor::visit().

void DefCollector::clear  )  [inline]
 

Definition at line 174 of file dataflow.h.

References AssignSet::clear(), defs, and initialised.

void DefCollector::dump  ) 
 

Definition at line 678 of file dataflow.cpp.

References print().

Assign* DefCollector::dumpAddrOfFourth  ) 
 

iterator DefCollector::end  )  [inline]
 

Definition at line 197 of file dataflow.h.

References defs, and AssignSet::end().

Referenced by CallStatement::accept(), ReturnStatement::accept(), makeCloneOf(), ArgSourceProvider::nextArgLoc(), ReturnStatement::searchAndReplace(), CallStatement::searchAndReplace(), CallStatement::updateArguments(), and UsedLocsVisitor::visit().

bool DefCollector::existsOnLeft Exp e  )  [inline]
 

Definition at line 198 of file dataflow.h.

References AssignSet::definesLoc(), and defs.

Referenced by insert().

Exp * DefCollector::findDefFor Exp e  ) 
 

Find the definition for a location.

If not found, return NULL

Definition at line 608 of file dataflow.cpp.

Referenced by ReturnStatement::findDefFor(), CallStatement::findDefFor(), and CallStatement::setTypeFor().

void DefCollector::insert Assign a  ) 
 

Definition at line 734 of file dataflow.cpp.

References defs, existsOnLeft(), Assignment::getLeft(), and AssignSet::insert().

Referenced by updateDefs().

bool DefCollector::isInitialised  )  [inline]
 

Definition at line 169 of file dataflow.h.

References initialised.

Referenced by CallStatement::localiseExp().

void DefCollector::makeCloneOf DefCollector other  ) 
 

makeCloneOf(): clone the given Collector into this one

Definition at line 691 of file dataflow.cpp.

References begin(), AssignSet::clear(), defs, end(), initialised, and AssignSet::insert().

Referenced by ReturnStatement::clone().

void DefCollector::print std::ostream &  os,
bool  html = false
 

Definition at line 631 of file dataflow.cpp.

References AssignSet::begin(), DEFCOL_COLS, defs, AssignSet::end(), and print().

Referenced by dump(), print(), and prints().

char * DefCollector::prints  ) 
 

Definition at line 664 of file dataflow.cpp.

References debug_buffer, DEBUG_BUFSIZE, and print().

void DefCollector::searchReplaceAll Exp from,
Exp to,
bool &  change
 

Search and replace all occurrences.

Definition at line 698 of file dataflow.cpp.

References AssignSet::begin(), defs, AssignSet::end(), and to.

void DefCollector::updateDefs std::map< Exp *, std::stack< Statement * >, lessExpStar > &  Stacks,
UserProc proc
 

Definition at line 593 of file dataflow.cpp.

References insert(), and Statement::setProc().


Member Data Documentation

AssignSet DefCollector::defs [private]
 

The set of definitions.

Definition at line 154 of file dataflow.h.

Referenced by begin(), clear(), end(), existsOnLeft(), insert(), makeCloneOf(), print(), and searchReplaceAll().

bool DefCollector::initialised [private]
 

Definition at line 150 of file dataflow.h.

Referenced by clear(), isInitialised(), and makeCloneOf().


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