Ignore:
Timestamp:
Mar 8, 2016, 4:28:40 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
bed4c63e
Parents:
e8032b0
Message:

Fold StackTable? variants into indexer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.h

    re8032b0 r52c2a72  
    9090                void print( std::ostream &os, int indent = 0 ) const;
    9191          private:
     92                // equivalents to lookup functions that only look at tables at scope `scope` (which should be >= tables->scope)
     93                NamedTypeDecl *lookupTypeAtScope( const std::string &id, unsigned long scope ) const;
     94                StructDecl *lookupStructAtScope( const std::string &id, unsigned long scope ) const;
     95                EnumDecl *lookupEnumAtScope( const std::string &id, unsigned long scope ) const;
     96                UnionDecl *lookupUnionAtScope( const std::string &id, unsigned long scope ) const;
     97                TraitDecl *lookupTraitAtScope( const std::string &id, unsigned long scope ) const;
     98               
    9299                void addId( DeclarationWithType *decl );
    93100                void addType( NamedTypeDecl *decl );
     
    100107               
    101108                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 ) {}
     109                Impl *tables;         ///< Copy-on-write instance of table data structure
     110                unsigned long scope;  ///< Scope index of this pointer
     111                bool doDebug;         ///< Display debugging trace?
    106112
    107113                /// Takes a new ref to a table (returns null if null)
     
    110116                static void deleteRef( Impl *toFree );
    111117
    112                 /// Ensures that tables variable is writable (i.e. allocated and uniquely owned by this Indexer)
     118                /// Ensures that tables variable is writable (i.e. allocated, uniquely owned by this Indexer, and at the current scope)
    113119                void makeWritable();
    114120        };
Note: See TracChangeset for help on using the changeset viewer.