#include <include/statement.h>
Inheritance diagram for ReturnStatement:
Definition at line 1223 of file statement.h.
Public Types | |
typedef StatementList::iterator | iterator |
Public Member Functions | |
virtual bool | accept (StmtPartModifier *visitor) |
virtual bool | accept (StmtModifier *visitor) |
virtual bool | accept (StmtExpVisitor *visitor) |
virtual bool | accept (StmtVisitor *visitor) |
void | addReturn (Assignment *a) |
iterator | begin () |
virtual Statement * | clone () |
virtual bool | definesLoc (Exp *loc) |
virtual void | dfaTypeAnalysis (bool &ch) |
iterator | end () |
iterator | erase (iterator it) |
Exp * | findDefFor (Exp *e) |
virtual void | generateCode (HLLCode *hll, BasicBlock *pbb, int indLevel) |
StatementList * | getCleanReturns () |
DefCollector * | getCollector () |
virtual void | getDefinitions (LocationSet &defs) |
StatementList & | getModifieds () |
unsigned | getNumReturns () |
ADDRESS | getRetAddr () |
StatementList & | getReturns () |
Type * | getTypeFor (Exp *e) |
virtual bool | isDefinition () |
virtual void | print (std::ostream &os=std::cout, bool html=false) |
void | removeModified (Exp *loc) |
void | removeReturn (Exp *loc) |
ReturnStatement () | |
virtual bool | search (Exp *, Exp *&) |
virtual bool | searchAll (Exp *search, std::list< Exp * > &result) |
virtual bool | searchAndReplace (Exp *search, Exp *replace, bool cc=false) |
void | setRetAddr (ADDRESS r) |
void | setTypeFor (Exp *e, Type *ty) |
virtual void | simplify () |
Exp * | subscriptWithDef (Exp *e) |
void | updateModifieds () |
void | updateReturns () |
virtual bool | usesExp (Exp *e) |
virtual | ~ReturnStatement () |
Protected Attributes | |
DefCollector | col |
A DefCollector object to collect the reaching definitions. | |
StatementList | modifieds |
A list of assignments that represents the locations modified by the enclosing procedure. | |
ADDRESS | retAddr |
StatementList | returns |
A list of assignments of locations to expressions. | |
Friends | |
class | XMLProgParser |
|
Definition at line 1258 of file statement.h. |
|
Definition at line 2796 of file statement.cpp. References Statement::kind, and STMT_RET. Referenced by clone(). |
|
Definition at line 2806 of file statement.cpp. |
|
Implements Statement. Definition at line 4082 of file statement.cpp. References StatementList::begin(), StatementList::end(), modifieds, returns, and StmtPartModifier::visit(). |
|
Implements Statement. Definition at line 3968 of file statement.cpp. References DefCollector::begin(), col, DefCollector::end(), StmtModifier::ignoreCollector(), and StmtModifier::visit(). |
|
Implements Statement. Definition at line 3838 of file statement.cpp. References StatementList::begin(), DefCollector::begin(), col, StatementList::end(), DefCollector::end(), StmtExpVisitor::isIgnoreCol(), modifieds, and StmtExpVisitor::visit(). |
|
Implements Statement. Definition at line 2832 of file statement.cpp. References StmtVisitor::visit(). Referenced by RtlTest::testVisitor(). |
|
Definition at line 2861 of file statement.cpp. References StatementList::append(), and returns. Referenced by StatementTest::testAddUsedLocsReturn(), StatementTest::testFlow(), StatementTest::testKill(), StatementTest::testSubscriptVars(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), and StatementTest::testUseOverKill(). |
|
Definition at line 1259 of file statement.h. References StatementList::begin(), and returns. Referenced by search(), searchAll(), searchAndReplace(), usesExp(), UsedLocsVisitor::visit(), and StmtConscriptSetter::visit(). |
|
Implements Statement. Definition at line 2815 of file statement.cpp. References StatementList::append(), StatementList::begin(), col, StatementList::end(), DefCollector::makeCloneOf(), modifieds, Statement::number, Statement::pbb, Statement::proc, retAddr, returns, and ReturnStatement(). |
|
Reimplemented from Statement. Definition at line 4243 of file statement.cpp. References StatementList::begin(), StatementList::end(), and modifieds. |
|
Reimplemented from Statement. Definition at line 759 of file dfa.cpp. References StatementList::begin(), StatementList::end(), and modifieds. |
|
Definition at line 1260 of file statement.h. References StatementList::end(), and returns. Referenced by search(), searchAll(), searchAndReplace(), usesExp(), UsedLocsVisitor::visit(), and StmtConscriptSetter::visit(). |
|
Definition at line 1261 of file statement.h. References StatementList::erase(), and returns. |
|
Definition at line 1323 of file statement.h. References col, and DefCollector::findDefFor(). |
|
Implements Statement. Definition at line 2836 of file statement.cpp. References HLLCode::AddReturnStatement(), and getReturns(). |
|
|
|
Definition at line 1316 of file statement.h. References col. Referenced by UsedLocsVisitor::visit(). |
|
Reimplemented from Statement. Definition at line 4253 of file statement.cpp. References StatementList::begin(), StatementList::end(), and modifieds. |
|
Definition at line 1262 of file statement.h. References modifieds. Referenced by UserProc::findPreserveds(), and UserProc::getModifieds(). |
|
Definition at line 1264 of file statement.h. References returns, and StatementList::size(). |
|
Definition at line 1319 of file statement.h. References retAddr. Referenced by UserProc::getTheReturnAddr(). |
|
Definition at line 1263 of file statement.h. References returns. Referenced by generateCode(). |
|
Reimplemented from Statement. Definition at line 4259 of file statement.cpp. References StatementList::begin(), StatementList::end(), and modifieds. |
|
Implements Statement. Definition at line 1294 of file statement.h. |
|
Implements Statement. Definition at line 4285 of file statement.cpp. References StatementList::begin(), StatementList::end(), Statement::number, RETSTMT_COLS, and returns. |
|
Definition at line 4936 of file statement.cpp. References modifieds, StatementList::removeDefOf(), and returns. |
|
Definition at line 2849 of file statement.cpp. References StatementList::begin(), StatementList::end(), StatementList::erase(), Exp::getSubExp1(), Exp::isSubscript(), and returns. Referenced by UserProc::removeReturn(). |
|
Implements Statement. Definition at line 2866 of file statement.cpp. References begin(), end(), NULL, and result. Referenced by searchAll(), and searchAndReplace(). |
|
Implements Statement. Definition at line 2889 of file statement.cpp. |
|
Implements Statement. Definition at line 2876 of file statement.cpp. References DefCollector::begin(), begin(), col, DefCollector::end(), end(), and search(). |
|
Definition at line 1320 of file statement.h. References retAddr. Referenced by UserProc::setTheReturnAddr(). |
|
Reimplemented from Statement. Definition at line 4268 of file statement.cpp. References StatementList::begin(), StatementList::end(), and modifieds. |
|
Implements Statement. Definition at line 2840 of file statement.cpp. References StatementList::begin(), StatementList::end(), modifieds, and returns. |
|
|
|
Definition at line 4368 of file statement.cpp. References StatementList::clear(), Proc::getSignature(), modifieds, FrontEnd::noReturnCallDest(), and Statement::proc. Referenced by UserProc::middleDecompile(). |
|
Definition at line 4435 of file statement.cpp. References StatementList::begin(), StatementList::clear(), StatementList::end(), UserProc::filterReturns(), Assignment::getLeft(), Proc::getSignature(), Signature::getStackRegister(), Exp::isRegN(), modifieds, Statement::proc, returns, and sp. Referenced by UserProc::middleDecompile(). |
|
Implements Statement. Definition at line 2905 of file statement.cpp. |
|
Reimplemented from Statement. Definition at line 1333 of file statement.h. |
|
A DefCollector object to collect the reaching definitions. These are not sorted or filtered. Second, some of those definitions make it to the modifieds list, which is sorted and filtered. These are the locations that are modified by the enclosing procedure. As locations are proved to be preserved (with NO modification, not even sp = sp+4), they are removed from this list. Defines in calls to the enclosing procedure are based on this list. Third, the modifications are initially copied to the returns list (also sorted and filtered, but the returns have RHS where the modifieds don't). Locations not live at any caller are removed from the returns, but not from the modifieds. Definition at line 1240 of file statement.h. Referenced by accept(), clone(), findDefFor(), getCollector(), and searchAndReplace(). |
|
A list of assignments that represents the locations modified by the enclosing procedure. These assignments have no RHS? These transmit type information to callers Note that these include preserved locations early on (?) Definition at line 1246 of file statement.h. Referenced by accept(), clone(), definesLoc(), dfaTypeAnalysis(), getDefinitions(), getModifieds(), getTypeFor(), XMLProgParser::persistToXML(), removeModified(), setTypeFor(), simplify(), updateModifieds(), and updateReturns(). |
|
Definition at line 1226 of file statement.h. Referenced by clone(), getRetAddr(), XMLProgParser::persistToXML(), and setRetAddr(). |
|
A list of assignments of locations to expressions. Initially definitions reaching the exit less preserveds; later has locations unused by any callers removed. A list is used to facilitate ordering. (A set would be ideal, but the ordering depends at runtime on the signature) Definition at line 1252 of file statement.h. Referenced by accept(), addReturn(), begin(), clone(), end(), erase(), getNumReturns(), getReturns(), XMLProgParser::persistToXML(), print(), removeModified(), removeReturn(), simplify(), and updateReturns(). |