Changeset 561354f for src/SymTab/Indexer.cc
- Timestamp:
- May 17, 2023, 1:33:39 AM (2 years ago)
- Branches:
- ADT
- Children:
- d6c464d
- Parents:
- 28f8f15
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
r28f8f15 r561354f 606 606 } 607 607 608 void Indexer::addAdt( const AdtDecl * decl ) { 609 ++*stats().add_calls; 610 const std::string & id = decl->name; 611 612 if ( ! adtTable ) { 613 adtTable = AdtTable::new_ptr(); 614 } else { 615 ++* stats().map_lookups; 616 auto existing = adtTable->find( id ); 617 if ( existing != adtTable->end() 618 && existing->second.scope == scope 619 && addedDeclConflicts( existing->second.decl, decl ) ) return; 620 621 } 622 623 lazyInitScope(); 624 ++* stats().map_mutations; 625 adtTable = adtTable->set( id, Scoped<AdtDecl>{ decl, scope} ); 626 } 627 608 628 void Indexer::addUnion( const std::string & id ) { 609 629 addUnion( new UnionDecl( id ) );
Note:
See TracChangeset
for help on using the changeset viewer.