Changeset e8032b0 for src/SymTab/Indexer.h
- Timestamp:
- Mar 8, 2016, 1:51:25 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 52c2a72
- Parents:
- 4e284ea6
- File:
-
- 1 edited
-
src/SymTab/Indexer.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.h
r4e284ea6 re8032b0 21 21 22 22 #include "SynTree/Visitor.h" 23 #include "IdTable.h"24 #include "AggregateTable.h"25 #include "TypeTable.h"26 23 27 24 namespace SymTab { … … 29 26 public: 30 27 Indexer( bool useDebug = false ); 28 29 Indexer( const Indexer &that ); 30 Indexer( Indexer &&that ); 31 31 virtual ~Indexer(); 32 Indexer& operator= ( const Indexer &that ); 33 Indexer& operator= ( Indexer &&that ); 32 34 33 35 //using Visitor::visit; … … 78 80 void leaveScope(); 79 81 80 void lookupId( const std::string &id, std::list< DeclarationWithType* > &) const;81 DeclarationWithType* lookupId( const std::string &id ) const;82 void lookupId( const std::string &id, std::list< DeclarationWithType* > &out ) const; 83 DeclarationWithType* lookupId( const std::string &id ) const; 82 84 NamedTypeDecl *lookupType( const std::string &id ) const; 83 85 StructDecl *lookupStruct( const std::string &id ) const; … … 88 90 void print( std::ostream &os, int indent = 0 ) const; 89 91 private: 90 IdTable idTable; 91 TypeTable typeTable; 92 StructTable structTable; 93 EnumTable enumTable; 94 UnionTable unionTable; 95 TraitTable contextTable; 96 97 bool doDebug; // display debugging trace 92 void addId( DeclarationWithType *decl ); 93 void addType( NamedTypeDecl *decl ); 94 void addStruct( const std::string &id ); 95 void addStruct( StructDecl *decl ); 96 void addEnum( EnumDecl *decl ); 97 void addUnion( const std::string &id ); 98 void addUnion( UnionDecl *decl ); 99 void addTrait( TraitDecl *decl ); 100 101 struct Impl; 102 Impl *tables; ///< Copy-on-write instance of table data structure 103 bool doDebug; ///< Display debugging trace? 104 105 Indexer( Impl *_tables, bool _doDebug ) : tables( _tables ), doDebug( _doDebug ) {} 106 107 /// Takes a new ref to a table (returns null if null) 108 static Impl *newRef( Impl *toClone ); 109 /// Clears a ref to a table (does nothing if null) 110 static void deleteRef( Impl *toFree ); 111 112 /// Ensures that tables variable is writable (i.e. allocated and uniquely owned by this Indexer) 113 void makeWritable(); 98 114 }; 99 115 } // namespace SymTab
Note:
See TracChangeset
for help on using the changeset viewer.