Changeset b419abb for src/SymTab/Indexer.h
- Timestamp:
- Mar 15, 2019, 2:22:25 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- fdae913
- Parents:
- b8665e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.h
rb8665e3 rb419abb 17 17 18 18 #include <functional> // for function 19 #include <iosfwd> // for ostream20 19 #include <list> // for list 21 20 #include <memory> // for shared_ptr, enable_shared_from_this … … 35 34 virtual ~Indexer(); 36 35 37 // when using an indexer manually (e.g., within a mutator traversal), it is necessary to tell the indexer38 // explicitly when scopes begin and end36 // when using an indexer manually (e.g., within a mutator traversal), it is necessary to 37 // tell the indexer explicitly when scopes begin and end 39 38 void enterScope(); 40 39 void leaveScope(); … … 74 73 TraitDecl *lookupTrait( const std::string &id ) const; 75 74 76 // void print( std::ostream &os, int indent = 0 ) const;77 78 /// looks up a specific mangled ID in local scope only79 // IdData * lookupIdAtScope( const std::string &id, const std::string &mangleName, unsigned long scope );80 // const IdData * localLookupId( const std::string &id, const std::string &mangleName ) const;81 // equivalents to lookup functions that only look at tables at scope `scope` (which should be >= tables->scope)82 // NamedTypeDecl *lookupTypeAtScope( const std::string &id, unsigned long scope ) const;83 // StructDecl *lookupStructAtScope( const std::string &id, unsigned long scope ) const;84 // EnumDecl *lookupEnumAtScope( const std::string &id, unsigned long scope ) const;85 // UnionDecl *lookupUnionAtScope( const std::string &id, unsigned long scope ) const;86 // TraitDecl *lookupTraitAtScope( const std::string &id, unsigned long scope ) const;87 88 75 /// Gets the type declaration with the given ID at global scope 89 76 NamedTypeDecl *globalLookupType( const std::string &id ) const; … … 118 105 void addFunctionType( FunctionType * ftype ); 119 106 120 // bool doDebug = false; ///< Display debugging trace?121 107 private: 122 108 /// Wraps a Decl* with a scope … … 148 134 Ptr prevScope; ///< reference to indexer for parent scope 149 135 unsigned long scope; ///< Scope index of this indexer 136 unsigned long repScope; ///< Scope index of currently represented scope 137 138 /// Ensures that a proper backtracking scope exists before a mutation 139 void lazyInitScope(); 150 140 151 141 /// Gets the indexer at the given scope
Note: See TracChangeset
for help on using the changeset viewer.