Location Class Reference

#include <include/exp.h>

Inheritance diagram for Location:

Unary Exp List of all members.

Detailed Description

Definition at line 843 of file exp.h.

Public Member Functions

virtual Expaccept (ExpModifier *v)
virtual bool accept (ExpVisitor *v)
virtual Expclone ()
virtual void getDefinitions (LocationSet &defs)
UserProcgetProc ()
 Location (Location &o)
 Location (OPER op, Exp *e, UserProc *proc)
 Create a new Location expression.
virtual bool match (const char *pattern, std::map< std::string, Exp * > &bindings)
virtual ExppolySimplify (bool &bMod)
void setProc (UserProc *p)

Static Public Member Functions

static Locationglobal (const char *nam, UserProc *p)
static Locationlocal (const char *nam, UserProc *p)
static LocationmemOf (Exp *e, UserProc *p=NULL)
static Locationparam (const char *nam, UserProc *p=NULL)
static LocationregOf (Exp *e)
static LocationregOf (int r)
static LocationtempOf (Exp *e)

Protected Member Functions

 Location (OPER op)

Protected Attributes

UserProcproc

Friends

class XMLProgParser


Constructor & Destructor Documentation

Location::Location OPER  op,
Exp exp,
UserProc proc
 

Create a new Location expression.

Parameters:
op Should be , opMemOf, opLocal, opGlobal, opParam or opTemp.

Definition at line 144 of file exp.cpp.

References Exp::getOper(), Unary::getSubExp1(), NULL, opGlobal, opLocal, opMemOf, opParam, opRegOf, opSubscript, opTemp, and proc.

Referenced by clone(), global(), local(), memOf(), param(), regOf(), and tempOf().

Location::Location Location o  ) 
 

Definition at line 174 of file exp.cpp.

Location::Location OPER  op  )  [inline, protected]
 

Definition at line 878 of file exp.h.


Member Function Documentation

Exp * Location::accept ExpModifier v  )  [virtual]
 

Reimplemented from Unary.

Definition at line 3712 of file exp.cpp.

References Exp::accept(), ExpModifier::postVisit(), ExpModifier::preVisit(), and Unary::subExp1.

bool Location::accept ExpVisitor v  )  [virtual]
 

Reimplemented from Unary.

Definition at line 3641 of file exp.cpp.

References Exp::accept(), Unary::subExp1, and ExpVisitor::visit().

Exp * Location::clone  )  [virtual]
 

Reimplemented from Unary.

Definition at line 328 of file exp.cpp.

References Exp::clone(), Location(), Exp::op, proc, and Unary::subExp1.

Referenced by ExpTest::testAccumulate(), ExpTest::testBinaries(), ExpTest::testCompare5(), ExpTest::testCompare6(), ExpTest::testFixSuccessor(), StatementTest::testLocationSet(), ExpTest::testSearch1(), ExpTest::testSearch2(), ExpTest::testSearch3(), ExpTest::testSearchAll(), ExpTest::testSearchReplace1(), ExpTest::testSearchReplace3(), ExpTest::testSearchReplace4(), ExpTest::testSimplifyBinary(), ExpTest::testUnaries(), and StatementTest::testWildLocationSet().

void Location::getDefinitions LocationSet defs  )  [virtual]
 

Definition at line 3540 of file exp.cpp.

References LocationSet::insert(), opRegOf, regOf(), and Unary::subExp1.

UserProc* Location::getProc  )  [inline]
 

Definition at line 866 of file exp.h.

References proc.

Referenced by GetProcVisitor::visit().

static Location* Location::global const char *  nam,
UserProc p
[inline, static]
 

Definition at line 857 of file exp.h.

References Location(), and opGlobal.

Referenced by Prog::addReloc(), FrontEnd::processProc(), Prog::readNativeAs(), and RtlTest::testSetConscripts().

Location * Location::local const char *  nam,
UserProc p
[static]
 

Definition at line 3868 of file exp.cpp.

References Location(), and opLocal.

Referenced by UserProc::addLocal(), CallStatement::calcResults(), StmtSsaXformer::commonLhs(), UserProc::newLocal(), ExpSsaXformer::postVisit(), UserProc::renameLocal(), UserProc::setExpSymbol(), StatementTest::testAddUsedLocsBool(), RtlTest::testSetConscripts(), StatementTest::testStripSizes(), and StmtSsaXformer::visit().

bool Location::match const char *  pattern,
std::map< std::string, Exp * > &  bindings
[virtual]
 

Reimplemented from Unary.

Definition at line 1507 of file exp.cpp.

References LOG, Exp::match(), Exp::op, opMemOf, opRegOf, and Unary::subExp1.

static Location* Location::memOf Exp e,
UserProc p = NULL
[inline, static]
 

Definition at line 855 of file exp.h.

References Location(), and opMemOf.

Referenced by PentiumDecoder::dis_Mem(), UserProc::fixCallAndPhiRefs(), CallingConvention::StdC::SparcSignature::getArgumentExp(), CallingConvention::StdC::ST20Signature::getArgumentExp(), CallingConvention::StdC::PPCSignature::getArgumentExp(), CallingConvention::StdC::PentiumSignature::getArgumentExp(), CallingConvention::Win32TcSignature::getArgumentExp(), CallingConvention::Win32Signature::getArgumentExp(), PentiumFrontEnd::getDefaultParams(), Signature::getFirstArgLoc(), CallingConvention::StdC::SparcSignature::getStackWildcard(), CallingConvention::StdC::ST20Signature::getStackWildcard(), CallingConvention::StdC::PPCSignature::getStackWildcard(), CallingConvention::StdC::PentiumSignature::getStackWildcard(), CallingConvention::Win32Signature::getStackWildcard(), Signature::getStdRetStmt(), UserProc::getSymbolExp(), DfaLocalMapper::preVisit(), UserProc::processFloatConstants(), SparcFrontEnd::quadOperation(), UserProc::searchRegularLocals(), ExpTest::testAddUsedLocs(), StatementTest::testAddUsedLocsAssign(), StatementTest::testAddUsedLocsBool(), StatementTest::testAddUsedLocsBranch(), StatementTest::testAddUsedLocsCall(), StatementTest::testAddUsedLocsCase(), StatementTest::testAddUsedLocsReturn(), ExpTest::testAssociativity(), ExpTest::testKillFill(), StatementTest::testRecursion(), ExpTest::testSearch3(), RtlTest::testSetConscripts(), ExpTest::testSetConscripts(), ExpTest::testSimplifyAddr(), ExpTest::testSimplifyArith(), ExpTest::testSimplifyBinary(), StatementTest::testStripSizes(), ExpTest::testSubscriptVar(), StatementTest::testSubscriptVars(), ExpTest::testSubscriptVars(), ExpTest::testVisitors(), and UsedLocalFinder::visit().

static Location* Location::param const char *  nam,
UserProc p = NULL
[inline, static]
 

Definition at line 860 of file exp.h.

References Location(), and opParam.

Referenced by UserProc::addParameterSymbols(), Cfg::findImplicitParamAssign(), RTLInstDict::instantiateRTL(), and UserProc::mapParameters().

Exp * Location::polySimplify bool &  bMod  )  [virtual]
 

Reimplemented from Unary.

Definition at line 3518 of file exp.cpp.

References Exp::getOper(), Exp::getSubExp1(), LOG, opMemOf, Unary::polySimplify(), and VERBOSE.

static Location* Location::regOf Exp e  )  [inline, static]
 

Definition at line 854 of file exp.h.

References Location(), NULL, and opRegOf.

static Location* Location::regOf int  r  )  [inline, static]
 

Definition at line 853 of file exp.h.

References Location(), NULL, and opRegOf.

Referenced by CallingConvention::StdC::SparcSignature::addReturn(), CallingConvention::StdC::ST20Signature::addReturn(), CallingConvention::StdC::PPCSignature::addReturn(), CallingConvention::StdC::PentiumSignature::addReturn(), CallingConvention::Win32Signature::addReturn(), PentiumFrontEnd::bumpRegisterAll(), crBit(), PentiumFrontEnd::decodeInstruction(), PentiumDecoder::decodeInstruction(), SparcDecoder::dis_Eaddr(), PPCDecoder::dis_RAmbz(), NJMCDecoder::dis_Reg(), PPCDecoder::dis_Reg(), SparcDecoder::dis_RegLhs(), SparcDecoder::dis_RegRhs(), SparcFrontEnd::emitCopyPC(), UserProc::findSpPreservation(), Exp::fixSuccessor(), SparcFrontEnd::gen32op32gives64(), CallingConvention::StdC::SparcSignature::getArgumentExp(), CallingConvention::StdC::ST20Signature::getArgumentExp(), CallingConvention::StdC::PPCSignature::getArgumentExp(), CallingConvention::StdC::PentiumSignature::getArgumentExp(), CallingConvention::Win32TcSignature::getArgumentExp(), CallingConvention::Win32Signature::getArgumentExp(), ST20FrontEnd::getDefaultParams(), SparcFrontEnd::getDefaultParams(), PPCFrontEnd::getDefaultParams(), PentiumFrontEnd::getDefaultParams(), ST20FrontEnd::getDefaultReturns(), SparcFrontEnd::getDefaultReturns(), PPCFrontEnd::getDefaultReturns(), PentiumFrontEnd::getDefaultReturns(), getDefinitions(), Statement::getInputRanges(), CallingConvention::StdC::ST20Signature::getProven(), CallingConvention::StdC::PentiumSignature::getProven(), CallingConvention::Win32Signature::getProven(), Signature::getReturnExp2(), CallingConvention::Win32Signature::getStackWildcard(), SparcFrontEnd::helperFunc(), PentiumFrontEnd::helperFunc(), SparcFrontEnd::helperFuncLong(), CallingConvention::StdC::SparcSignature::isAddrOfStackLocal(), Signature::isAddrOfStackLocal(), PentiumFrontEnd::isDecAh(), UserProc::isLocalOrParamPattern(), PentiumFrontEnd::isStoreFsw(), UserProc::mapExpressionsToLocals(), Prog::newProc(), PentiumFrontEnd::processFloatCode(), SparcFrontEnd::quadOperation(), CallingConvention::Win32Signature::qualified(), UserProc::removeSpAssignsIfPossible(), UserProc::searchRegularLocals(), CallingConvention::StdC::PentiumSignature::setLibraryDefines(), CallingConvention::Win32Signature::setLibraryDefines(), ExpTest::testAddUsedLocs(), StatementTest::testAddUsedLocsAssign(), StatementTest::testAddUsedLocsBool(), StatementTest::testAddUsedLocsBranch(), StatementTest::testAddUsedLocsCall(), StatementTest::testAddUsedLocsCase(), StatementTest::testAddUsedLocsReturn(), RtlTest::testAppend(), ExpTest::testAssociativity(), StatementTest::testBypass(), StatementTest::testClone(), RtlTest::testClone(), StatementTest::testEndlessLoop(), StatementTest::testFindConstants(), ExpTest::testFixSuccessor(), StatementTest::testFlow(), StatementTest::testIsAssign(), StatementTest::testIsFlagAssgn(), StatementTest::testKill(), ExpTest::testKillFill(), StatementTest::testLocationSet(), ExpTest::testParen(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), StatementTest::testRecursion(), ExpTest::testSearchAll(), RtlTest::testSetConscripts(), ExpTest::testSetConscripts(), ExpTest::testSimplifyAddr(), ExpTest::testSimplifyArith(), ExpTest::testSimplifyBinary(), StatementTest::testStripSizes(), ExpTest::testSubscriptVar(), StatementTest::testSubscriptVars(), ExpTest::testSubscriptVars(), ExpTest::testTypeOf(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), StatementTest::testUseOverKill(), ExpTest::testVisitors(), StatementTest::testWildLocationSet(), CallingConvention::Win32Signature::Win32Signature(), and CallingConvention::Win32TcSignature::Win32TcSignature().

void Location::setProc UserProc p  )  [inline]
 

Definition at line 865 of file exp.h.

References proc.

Referenced by CallStatement::generateCode(), CallStatement::setSigArguments(), and FixProcVisitor::visit().

static Location* Location::tempOf Exp e  )  [inline, static]
 

Definition at line 856 of file exp.h.

References Location(), NULL, and opTemp.

Referenced by SparcFrontEnd::gen32op32gives64(), PentiumFrontEnd::helperFunc(), PentiumFrontEnd::processFloatCode(), and ExpTest::testSubscriptVars().


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented from Unary.

Definition at line 877 of file exp.h.


Member Data Documentation

UserProc* Location::proc [protected]
 

Definition at line 845 of file exp.h.

Referenced by clone(), getProc(), Location(), XMLProgParser::persistToXML(), and setProc().


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