Changeset 5f2f2d7 for src/SymTab
- Timestamp:
- Jun 8, 2015, 8:56:35 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 81419b5
- Parents:
- cd623a4
- Location:
- src/SymTab
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/SymTab/Mangler.cc ¶
rcd623a4 r5f2f2d7 10 10 // Created On : Sun May 17 21:40:29 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 16:50:47201513 // Update Count : 312 // Last Modified On : Mon Jun 8 15:12:12 2015 13 // Update Count : 8 14 14 // 15 15 … … 160 160 } else { 161 161 printQualifiers( typeInst ); 162 std::ostr stream numStream;162 std::ostringstream numStream; 163 163 numStream << varNum->second.first; 164 mangleName << (numStream.pcount() + 1);165 164 switch ( (TypeDecl::Kind )varNum->second.second ) { 166 165 case TypeDecl::Any: … … 174 173 break; 175 174 } // switch 176 mangleName << std::string( numStream.str(), numStream.pcount());175 mangleName << numStream.str(); 177 176 } // if 178 177 } … … 220 219 sub_mangler.varNums = varNums; 221 220 (*assert)->accept( sub_mangler ); 222 assertionNames.push_back( s td::string( sub_mangler.mangleName.str(), sub_mangler.mangleName.pcount()) );221 assertionNames.push_back( sub_mangler.mangleName.str() ); 223 222 } // for 224 223 } // for -
TabularUnified src/SymTab/Mangler.h ¶
rcd623a4 r5f2f2d7 10 10 // Created On : Sun May 17 21:44:03 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 16:49:21201513 // Update Count : 312 // Last Modified On : Mon Jun 8 14:47:14 2015 13 // Update Count : 5 14 14 // 15 15 … … 17 17 #define MANGLER_H 18 18 19 #include <s trstream>19 #include <sstream> 20 20 #include "SynTree/SynTree.h" 21 21 #include "SynTree/Visitor.h" … … 43 43 virtual void visit( TupleType *tupleType ); 44 44 45 std::string get_mangleName() { return std::string( mangleName.str(), mangleName.pcount()); }45 std::string get_mangleName() { return mangleName.str(); } 46 46 private: 47 std::ostr stream mangleName;47 std::ostringstream mangleName; 48 48 typedef std::map< std::string, std::pair< int, int > > VarMapType; 49 49 VarMapType varNums; -
TabularUnified src/SymTab/Validate.cc ¶
rcd623a4 r5f2f2d7 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon May 25 14:27:15 201513 // Update Count : 2 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 8 17:19:35 2015 13 // Update Count : 22 14 14 // 15 15 … … 651 651 652 652 void addDecls( std::list< Declaration * > &declsToAdd, std::list< Statement * > &statements, std::list< Statement * >::iterator i ) { 653 if ( ! declsToAdd.empty() ) { 654 for ( std::list< Declaration * >::iterator decl = declsToAdd.begin(); decl != declsToAdd.end(); ++decl ) { 655 statements.insert( i, new DeclStmt( noLabels, *decl ) ); 656 } // for 657 declsToAdd.clear(); 658 } // if 653 for ( std::list< Declaration * >::iterator decl = declsToAdd.begin(); decl != declsToAdd.end(); ++decl ) { 654 statements.insert( i, new DeclStmt( noLabels, *decl ) ); 655 } // for 656 declsToAdd.clear(); 659 657 } 660 658
Note: See TracChangeset
for help on using the changeset viewer.