Ignore:
Timestamp:
Jun 5, 2015, 8:12:32 AM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
a65d92e
Parents:
cf0941d
Message:

remove all carriage returns from printing, work on regression testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    rcf0941d r44b5ca0  
    1010// Created On       : Sun May 17 21:37:33 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 16:49:55 2015
    13 // Update Count     : 3
     12// Last Modified On : Fri Jun  5 08:05:17 2015
     13// Update Count     : 5
    1414//
    1515
     
    5151        }
    5252
    53 /********
    54  * A NOTE ON THE ORDER OF TRAVERSAL
    55  *
    56  * Types and typedefs have their base types visited before they are added to the type table.
    57  * This is ok, since there is no such thing as a recursive type or typedef.
    58  *             typedef struct { T *x; } T; // never allowed
    59  *
    60  * for structs/unions, it is possible to have recursion, so the decl should be added as if it's
    61  * incomplete to begin, the members are traversed, and then the complete type should be added
    62  * (assuming the type is completed by this particular declaration).
    63  *             struct T { struct T *x; }; // allowed
    64  *
    65  * It's important to add the complete type to the symbol table *after* the members/base has been
    66  * traversed, since that traversal may modify the definition of the type and these modifications
    67  * should be visible when the symbol table is queried later in this pass.
    68  *
    69  * TODO: figure out whether recursive contexts are sensible/possible/reasonable.
    70  */
     53
     54// A NOTE ON THE ORDER OF TRAVERSAL
     55//
     56// Types and typedefs have their base types visited before they are added to the type table.  This is ok, since there is
     57// no such thing as a recursive type or typedef.
     58//
     59//             typedef struct { T *x; } T; // never allowed
     60//
     61// for structs/unions, it is possible to have recursion, so the decl should be added as if it's incomplete to begin, the
     62// members are traversed, and then the complete type should be added (assuming the type is completed by this particular
     63// declaration).
     64//
     65//             struct T { struct T *x; }; // allowed
     66//
     67// It is important to add the complete type to the symbol table *after* the members/base has been traversed, since that
     68// traversal may modify the definition of the type and these modifications should be visible when the symbol table is
     69// queried later in this pass.
     70//
     71// TODO: figure out whether recursive contexts are sensible/possible/reasonable.
     72
    7173
    7274        void Indexer::visit( TypeDecl *typeDecl ) {
    7375                // see A NOTE ON THE ORDER OF TRAVERSAL, above
    74                 // note that assertions come after the type is added to the symtab, since they aren't part
    75                 // of the type proper and may depend on the type itself
     76                // note that assertions come after the type is added to the symtab, since they are not part of the type proper
     77                // and may depend on the type itself
    7678                enterScope();
    7779                acceptAll( typeDecl->get_parameters(), *this );
Note: See TracChangeset for help on using the changeset viewer.