Changeset 80eefcb
- Timestamp:
- Feb 14, 2019, 11:14:50 AM (6 years ago)
- Branches:
- no_list
- Children:
- 99614c2
- Parents:
- 8d25360
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r8d25360 r80eefcb 282 282 283 283 void markAssertions( AssertionSet &assertion1, AssertionSet &assertion2, Type *type ) { 284 for ( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar) {285 for ( std::list< DeclarationWithType* >::const_iterator assert = (*tyvar)->get_assertions().begin(); assert != (*tyvar)->get_assertions().end(); ++assert) {286 markAssertionSet( assertion1, *assert );287 markAssertionSet( assertion2, *assert );284 for ( auto tyvar : type->get_forall() ) { 285 for ( auto assert : tyvar->get_assertions() ) { 286 markAssertionSet( assertion1, assert ); 287 markAssertionSet( assertion2, assert ); 288 288 } // for 289 289 } // for -
src/SymTab/Demangle.cc
r8d25360 r80eefcb 543 543 if (done()) return nullptr; 544 544 545 std::list<TypeDecl *>forall;545 Type::ForallList forall; 546 546 if (isPrefix(Encoding::forall)) { 547 547 PRINT( std::cerr << "polymorphic with..." << std::endl; ) -
src/SymTab/Indexer.cc
r8d25360 r80eefcb 674 674 } 675 675 676 void Indexer::addTypes( const std::list< TypeDecl * >& tds ) {676 void Indexer::addTypes( const Type::ForallList & tds ) { 677 677 for ( auto td : tds ) { 678 678 addType( td ); -
src/SymTab/Indexer.h
r8d25360 r80eefcb 21 21 #include <functional> // for function 22 22 23 #include "SynTree/Type.h" // for AST nodes 24 #include "SynTree/SynTree.h" // for AST nodes 23 25 #include "SynTree/Visitor.h" // for Visitor 24 #include "SynTree/SynTree.h" // for AST nodes25 26 26 27 namespace ResolvExpr { … … 119 120 120 121 /// convenience function for adding a list of forall parameters to the indexer 121 void addTypes( const std::list< TypeDecl * >& tds );122 void addTypes( const Type::ForallList & tds ); 122 123 123 124 /// convenience function for adding all of the declarations in a function type to the indexer -
src/SymTab/Validate.cc
r8d25360 r80eefcb 808 808 809 809 /// Fix up assertions - flattens assertion lists, removing all trait instances 810 void forallFixer( std::list< TypeDecl * > & forall, BaseSyntaxNode * node ) { 810 template<typename container_t> 811 void forallFixer( container_t & forall, BaseSyntaxNode * node ) { 811 812 for ( TypeDecl * type : forall ) { 812 std::list< DeclarationWithType * >asserts;813 asserts.splice( asserts.end(), type->assertions );813 decltype(type->assertions) asserts; 814 std::swap(asserts, type->assertions ); 814 815 // expand trait instances into their members 815 816 for ( DeclarationWithType * assertion : asserts ) { -
src/SynTree/Type.h
r8d25360 r80eefcb 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 25 14:14:01 201713 // Update Count : 1 5412 // Last Modified On : Fri Feb 8 09:17:09 2019 13 // Update Count : 164 14 14 // 15 15 … … 18 18 #include <strings.h> // for ffs 19 19 #include <cassert> // for assert, assertf 20 #include <list> // for list, _List_iterator20 #include <list> 21 21 #include <ostream> // for ostream, operator<<, basic_ostream 22 22 #include <string> // for string 23 #include <vector> 23 #include <vector> // for vector 24 24 25 25 #include "BaseSyntaxNode.h" // for BaseSyntaxNode … … 134 134 }; // Qualifiers 135 135 136 typedef std:: list<TypeDecl *> ForallList;136 typedef std::vector<TypeDecl *> ForallList; 137 137 138 138 Qualifiers tq;
Note: See TracChangeset
for help on using the changeset viewer.