Changeset 53449a4 for src/SymTab
- Timestamp:
- Dec 16, 2020, 4:01:57 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8ba363e, c8025a21
- Parents:
- b3c8496 (diff), 3e5dd913 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/SymTab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Mangler.cc
rb3c8496 r53449a4 666 666 // skip if not including qualifiers 667 667 if ( typeMode ) return; 668 if ( auto ptype = dynamic_cast< const ast:: ParameterizedType * >(type) ) {668 if ( auto ptype = dynamic_cast< const ast::FunctionType * >(type) ) { 669 669 if ( ! ptype->forall.empty() ) { 670 670 std::list< std::string > assertionNames; 671 671 int dcount = 0, fcount = 0, vcount = 0, acount = 0; 672 672 mangleName += Encoding::forall; 673 for ( const ast::TypeDecl *decl : ptype->forall ) {673 for ( auto & decl : ptype->forall ) { 674 674 switch ( decl->kind ) { 675 675 case ast::TypeDecl::Kind::Dtype: … … 686 686 } // switch 687 687 varNums[ decl->name ] = std::make_pair( nextVarNum, (int)decl->kind ); 688 for ( const ast::DeclWithType * assert : decl->assertions ) {689 ast::Pass<Mangler_new> sub_mangler(690 mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums );691 assert->accept( sub_mangler);692 assertionNames.push_back( sub_mangler.core.get_mangleName());693 acount++;694 } // for688 } // for 689 for ( auto & assert : ptype->assertions ) { 690 ast::Pass<Mangler_new> sub_mangler( 691 mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums ); 692 assert->var->accept( sub_mangler ); 693 assertionNames.push_back( sub_mangler.core.get_mangleName() ); 694 acount++; 695 695 } // for 696 696 mangleName += std::to_string( dcount ) + "_" + std::to_string( fcount ) + "_" + std::to_string( vcount ) + "_" + std::to_string( acount ) + "_"; -
src/SymTab/Validate.cc
rb3c8496 r53449a4 1463 1463 } 1464 1464 1465 /* 1466 1465 1467 /// Associates forward declarations of aggregates with their definitions 1466 1468 class LinkReferenceToTypes_new final … … 1793 1795 static const node_t * forallFixer( 1794 1796 const CodeLocation & loc, const node_t * node, 1795 ast:: ParameterizedType::ForallList parent_t::* forallField1797 ast::FunctionType::ForallList parent_t::* forallField 1796 1798 ) { 1797 1799 for ( unsigned i = 0; i < (node->* forallField).size(); ++i ) { … … 1844 1846 } 1845 1847 }; 1848 */ 1846 1849 } // anonymous namespace 1847 1850 1851 /* 1848 1852 const ast::Type * validateType( 1849 1853 const CodeLocation & loc, const ast::Type * type, const ast::SymbolTable & symtab ) { … … 1854 1858 return type->accept( lrt )->accept( fpd ); 1855 1859 } 1860 */ 1856 1861 1857 1862 } // namespace SymTab
Note: See TracChangeset
for help on using the changeset viewer.