Changeset 1690778 for src/ResolvExpr
- Timestamp:
- May 1, 2019, 7:49:16 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3908e5d
- Parents:
- 98d4df9
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/RenameVars.cc
r98d4df9 r1690778 10 10 // Created On : Sun May 17 12:05:18 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 17:36:32 201613 // Update Count : 512 // Last Modified On : Tue Apr 30 17:07:57 2019 13 // Update Count : 7 14 14 // 15 15 … … 39 39 private: 40 40 int level, resetCount; 41 std::list< std:: map< std::string, std::string > > mapStack;41 std::list< std::unordered_map< std::string, std::string > > mapStack; 42 42 }; 43 43 … … 55 55 namespace { 56 56 RenameVars::RenameVars() : level( 0 ), resetCount( 0 ) { 57 mapStack.push_front( std:: map< std::string, std::string >() );57 mapStack.push_front( std::unordered_map< std::string, std::string >() ); 58 58 } 59 59 … … 65 65 void RenameVars::previsit( TypeInstType * instType ) { 66 66 previsit( (Type *)instType ); 67 std:: map< std::string, std::string >::const_iterator i = mapStack.front().find( instType->name );67 std::unordered_map< std::string, std::string >::const_iterator i = mapStack.front().find( instType->name ); 68 68 if ( i != mapStack.front().end() ) { 69 69 instType->name = i->second; -
src/ResolvExpr/TypeEnvironment.h
r98d4df9 r1690778 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:24:58 2015 11 // Last Modified By : Aaron B. Moss12 // Last Modified On : Mon Jun 18 11:58:00 201813 // Update Count : 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 30 23:04:10 2019 13 // Update Count : 9 14 14 // 15 15 … … 18 18 #include <iostream> // for ostream 19 19 #include <list> // for list, list<>::iterator, list<>... 20 #include <map> // for map, map<>::value_compare 21 #include <set> // for set 20 #include <map> // for map, map<>::value_compare 21 #include <unordered_map> 22 #include <set> // for set 22 23 #include <string> // for string 23 24 #include <utility> // for move, swap … … 64 65 AssertionSetValue() : isUsed(false), resnSlot(0) {} 65 66 }; 66 typedef std::map< DeclarationWithType *, AssertionSetValue, AssertCompare > AssertionSet;67 typedef std:: map< std::string, TypeDecl::Data > OpenVarSet;67 typedef std::map< DeclarationWithType *, AssertionSetValue, AssertCompare > AssertionSet; 68 typedef std::unordered_map< std::string, TypeDecl::Data > OpenVarSet; 68 69 69 70 /// merges one set of open vars into another
Note: See TracChangeset
for help on using the changeset viewer.