00001 00015 #include "InterDep.hpp" 00016 00017 namespace OA { 00018 namespace Activity { 00019 00021 OA_ptr<Activity::DepStandard> InterDep::getDepResults(ProcHandle proc) 00022 { if (mProcToDepMap[proc].ptrEqual(0)) { 00023 OA_ptr<DepStandard> empty; 00024 empty = new DepStandard(); 00025 mProcToDepMap[proc] = empty; 00026 } 00027 return mProcToDepMap[proc]; 00028 } 00029 00035 OA_ptr<DepDFSet> InterDep::getDepForCall(ExprHandle call) 00036 { 00037 if (mCallToDepDFSet[call].ptrEqual(0)) { 00038 mCallToDepDFSet[call] = new DepDFSet; 00039 OA_ptr<Location> unknown; unknown = new UnknownLoc; 00040 mCallToDepDFSet[call]->insertDep(unknown,unknown); 00041 } 00042 return mCallToDepDFSet[call]; 00043 } 00044 00045 //***************************************************************** 00046 // Output 00047 //***************************************************************** 00049 void InterDep::dump(std::ostream& os, OA_ptr<IRHandlesIRInterface> ir) 00050 { 00051 os << "====================== InterDep" << std::endl; 00052 std::map<ProcHandle,OA_ptr<DepStandard> >::iterator mapIter; 00053 for (mapIter=mProcToDepMap.begin(); 00054 mapIter!=mProcToDepMap.end(); 00055 mapIter++) 00056 { 00057 os << "----------------------- proc results ----" << std::endl; 00058 OA_ptr<DepStandard> results = mapIter->second; 00059 results->dump(os,ir); 00060 os << "-------------------------------" << std::endl; 00061 } 00062 00063 std::map<ExprHandle,OA_ptr<DepDFSet> >::iterator callIter; 00064 for (callIter=mCallToDepDFSet.begin(); 00065 callIter!=mCallToDepDFSet.end(); 00066 callIter++) 00067 { 00068 os << "----------------------- call results ----" << std::endl; 00069 OA_ptr<DepDFSet> results = callIter->second; 00070 results->dump(os,ir); 00071 os << "-------------------------------" << std::endl; 00072 } 00073 00074 } 00075 00076 } // end of Activity namespace 00077 } // end of OA namespace 00078 00079
1.7.1