Changes in / [734014e:1b3eef8]
- Files:
-
- 6 edited
-
src/ResolvExpr/RenameVars.cc (modified) (4 diffs)
-
src/ResolvExpr/TypeEnvironment.h (modified) (3 diffs)
-
src/SynTree/Declaration.h (modified) (3 diffs)
-
src/SynTree/TypeSubstitution.h (modified) (5 diffs)
-
tests/.expect/declarationSpecifier.x64.txt (modified) (1 diff)
-
tests/declarationSpecifier.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/RenameVars.cc
r734014e r1b3eef8 10 10 // Created On : Sun May 17 12:05:18 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 30 17:07:57 201913 // Update Count : 712 // Last Modified On : Wed Mar 2 17:36:32 2016 13 // Update Count : 5 14 14 // 15 15 … … 39 39 private: 40 40 int level, resetCount; 41 std::list< std:: unordered_map< std::string, std::string > > mapStack;41 std::list< std::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:: unordered_map< std::string, std::string >() );57 mapStack.push_front( std::map< std::string, std::string >() ); 58 58 } 59 59 … … 65 65 void RenameVars::previsit( TypeInstType * instType ) { 66 66 previsit( (Type *)instType ); 67 std:: unordered_map< std::string, std::string >::const_iterator i = mapStack.front().find( instType->name );67 std::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
r734014e r1b3eef8 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:24:58 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Apr 30 23:04:10 201913 // Update Count : 911 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Mon Jun 18 11:58:00 2018 13 // Update Count : 4 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 <unordered_map> 22 #include <set> // for set 20 #include <map> // for map, map<>::value_compare 21 #include <set> // for set 23 22 #include <string> // for string 24 23 #include <utility> // for move, swap … … 65 64 AssertionSetValue() : isUsed(false), resnSlot(0) {} 66 65 }; 67 typedef std::map< DeclarationWithType *, AssertionSetValue, AssertCompare > AssertionSet;68 typedef std:: unordered_map< std::string, TypeDecl::Data > OpenVarSet;66 typedef std::map< DeclarationWithType*, AssertionSetValue, AssertCompare > AssertionSet; 67 typedef std::map< std::string, TypeDecl::Data > OpenVarSet; 69 68 70 69 /// merges one set of open vars into another -
src/SynTree/Declaration.h
r734014e r1b3eef8 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 1 07:46:49 201913 // Update Count : 13 412 // Last Modified On : Sun Sep 3 19:24:06 2017 13 // Update Count : 131 14 14 // 15 15 … … 19 19 #include <iosfwd> // for ostream 20 20 #include <list> // for list 21 #include <unordered_map> // for unordered_map22 21 #include <string> // for string, operator+, allocator, to_string 23 22 … … 335 334 virtual Declaration *acceptMutator( Mutator &m ) override { return m.mutate( this ); } 336 335 private: 337 std:: unordered_map< std::string, long long int > enumValues;336 std::map< std::string, long long int > enumValues; 338 337 virtual std::string typeString() const override; 339 338 }; -
src/SynTree/TypeSubstitution.h
r734014e r1b3eef8 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 30 22:52:47 201913 // Update Count : 912 // Last Modified On : Sat Jul 22 09:52:24 2017 13 // Update Count : 3 14 14 // 15 15 … … 19 19 #include <iosfwd> // for ostream 20 20 #include <list> // for list<>::iterator, _List_iterator 21 #include < unordered_map>22 #include < unordered_set>21 #include <map> // for _Rb_tree_iterator, map, map<>::val... 22 #include <set> // for set 23 23 #include <string> // for string, operator!= 24 24 #include <utility> // for pair … … 78 78 friend class PassVisitor; 79 79 80 typedef std:: unordered_map< std::string, Type* > TypeEnvType;81 typedef std:: unordered_map< std::string, Expression* > VarEnvType;80 typedef std::map< std::string, Type* > TypeEnvType; 81 typedef std::map< std::string, Expression* > VarEnvType; 82 82 TypeEnvType typeEnv; 83 83 VarEnvType varEnv; … … 98 98 ActualIterator actualIt = actualBegin; 99 99 for ( ; formalIt != formalEnd; ++formalIt, ++actualIt ) { 100 if ( TypeDecl *formal = dynamic_cast< TypeDecl * >( *formalIt ) ) {101 if ( TypeExpr *actual = dynamic_cast< TypeExpr * >( *actualIt ) ) {100 if ( TypeDecl *formal = dynamic_cast< TypeDecl* >( *formalIt ) ) { 101 if ( TypeExpr *actual = dynamic_cast< TypeExpr* >( *actualIt ) ) { 102 102 if ( formal->get_name() != "" ) { 103 103 TypeEnvType::iterator i = typeEnv.find( formal->get_name() ); … … 146 146 int subCount = 0; 147 147 bool freeOnly; 148 typedef std:: unordered_set< std::string > BoundVarsType;148 typedef std::set< std::string > BoundVarsType; 149 149 BoundVarsType boundVars; 150 150 }; -
tests/.expect/declarationSpecifier.x64.txt
r734014e r1b3eef8 691 691 ((void)(_X12_retval_maini_1=0) /* ?{} */); 692 692 return _X12_retval_maini_1; 693 ((void)(_X12_retval_maini_1=0) /* ?{} */); 694 return _X12_retval_maini_1; 693 695 } 694 696 static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return _X4mainFi_iPPKc__1((signed int )argc, (const char **)argv); } -
tests/declarationSpecifier.cfa
r734014e r1b3eef8 10 10 // Created On : Wed Aug 17 08:21:04 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 30 18:20:36 201913 // Update Count : 412 // Last Modified On : Tue Nov 6 17:52:59 2018 13 // Update Count : 3 14 14 // 15 15 … … 89 89 90 90 //Dummy main 91 int main( int argc, char const * argv[] ) {} 91 int main(int argc, char const *argv[]) 92 { 93 return 0; 94 } 92 95 93 96 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.