Changeset 6ac5223 for src/SymTab


Ignore:
Timestamp:
Aug 17, 2017, 3:42:21 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
e50e9ff
Parents:
97e3296 (diff), 21f0aa8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SymTab
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    r97e3296 r6ac5223  
    1515#include "Autogen.h"
    1616
     17#include <cstddef>                 // for NULL
    1718#include <algorithm>               // for count_if
    1819#include <cassert>                 // for safe_dynamic_cast, assert, assertf
     
    2021#include <list>                    // for list, _List_iterator, list<>::iter...
    2122#include <set>                     // for set, _Rb_tree_const_iterator
     23#include <utility>                 // for pair
    2224#include <vector>                  // for vector
    2325
    24 #include "AddVisit.h"              // for addVisit
    25 #include "Common/ScopedMap.h"      // for ScopedMap<>::const_iterator, Scope...
    26 #include "Common/utility.h"        // for cloneAll, operator+
    27 #include "GenPoly/DeclMutator.h"   // for DeclMutator
    28 #include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::iterator
    29 #include "SymTab/Mangler.h"        // for Mangler
    30 #include "SynTree/Mutator.h"       // for maybeMutate
    31 #include "SynTree/Statement.h"     // for CompoundStmt, ReturnStmt, ExprStmt
    32 #include "SynTree/Type.h"          // for FunctionType, Type, TypeInstType
    33 #include "SynTree/Visitor.h"       // for maybeAccept, Visitor, acceptAll
    34 
    35 class Attribute;
     26#include "AddVisit.h"             // for addVisit
     27#include "Common/ScopedMap.h"     // for ScopedMap
     28#include "GenPoly/DeclMutator.h"  // for DeclMutator
     29#include "GenPoly/ScopedSet.h"    // for ScopedSet
     30#include "Parser/LinkageSpec.h"   // for AutoGen, Intrinsic, Spec
     31#include "SymTab/Mangler.h"       // for mangleType
     32#include "SynTree/Statement.h"    // for SwitchStmt (ptr only), CompoundStmt
     33#include "SynTree/Type.h"         // for Type, ArrayType, Type::StorageClasses
     34#include "SynTree/Visitor.h"      // for Visitor
    3635
    3736namespace SymTab {
  • src/SymTab/Autogen.h

    r97e3296 r6ac5223  
    1717
    1818#include <cassert>                // for assert
    19 #include <iterator>               // for back_insert_iterator, back_inserter
    20 #include <list>                   // for list
    21 #include <string>                 // for string, operator==
     19#include <string>                 // for string
    2220
    2321#include "Common/UniqueName.h"    // for UniqueName
    2422#include "InitTweak/InitTweak.h"  // for InitExpander
    25 #include "Parser/LinkageSpec.h"   // for C
    2623#include "SynTree/Constant.h"     // for Constant
    27 #include "SynTree/Declaration.h"  // for ObjectDecl, Declaration (ptr only)
    28 #include "SynTree/Expression.h"   // for UntypedExpr, NameExpr, VariableExpr
    29 #include "SynTree/Initializer.h"  // for SingleInit
    30 #include "SynTree/Label.h"        // for Label, noLabels
    31 #include "SynTree/Statement.h"    // for Statement (ptr only), CompoundStmt
     24#include "SynTree/Declaration.h"  // for DeclarationWithType, ObjectDecl
     25#include "SynTree/Expression.h"   // for NameExpr, ConstantExpr, UntypedExpr...
    3226#include "SynTree/Type.h"         // for Type, ArrayType, Type::Qualifiers
     27
     28class CompoundStmt;
     29class Statement;
    3330
    3431namespace SymTab {
  • src/SymTab/FixFunction.cc

    r97e3296 r6ac5223  
    2020#include "Common/utility.h"       // for maybeClone
    2121#include "SynTree/Declaration.h"  // for FunctionDecl, ObjectDecl, Declarati...
     22#include "SynTree/Expression.h"   // for Expression
    2223#include "SynTree/Type.h"         // for ArrayType, PointerType, Type, Basic...
    2324
  • src/SymTab/Indexer.cc

    r97e3296 r6ac5223  
    353353        }
    354354
     355        void Indexer::visit( ForStmt *forStmt ) {
     356            // for statements introduce a level of scope
     357            enterScope();
     358            Visitor::visit( forStmt );
     359            leaveScope();
     360        }
     361
     362        void Indexer::visit( CatchStmt *catchStmt ) {
     363                // catch statements introduce a level of scope (for the caught exception)
     364                enterScope();
     365                Visitor::visit( catchStmt );
     366                leaveScope();
     367        }
    355368
    356369        void Indexer::visit( ApplicationExpr *applicationExpr ) {
     
    556569                leaveScope();
    557570        }
    558 
    559         void Indexer::visit( ForStmt *forStmt ) {
    560             // for statements introduce a level of scope
    561             enterScope();
    562             Visitor::visit( forStmt );
    563             leaveScope();
    564         }
    565 
    566 
    567571
    568572        void Indexer::lookupId( const std::string &id, std::list< DeclarationWithType* > &out ) const {
  • src/SymTab/Indexer.h

    r97e3296 r6ac5223  
    4545
    4646                virtual void visit( CompoundStmt *compoundStmt );
     47                virtual void visit( ForStmt *forStmt );
     48                virtual void visit( CatchStmt *catchStmt );
    4749
    4850                virtual void visit( ApplicationExpr *applicationExpr );
     
    8183                virtual void visit( StructInstType *contextInst );
    8284                virtual void visit( UnionInstType *contextInst );
    83 
    84                 virtual void visit( ForStmt *forStmt );
    8585
    8686                // when using an indexer manually (e.g., within a mutator traversal), it is necessary to tell the indexer
  • src/SymTab/Mangler.cc

    r97e3296 r6ac5223  
    2020#include <iterator>                 // for ostream_iterator, back_insert_ite...
    2121#include <list>                     // for _List_iterator, list, _List_const...
    22 #include <string>                   // for string, operator<<, basic_string
     22#include <string>                   // for string, char_traits, operator<<
    2323
    2424#include "CodeGen/OperatorTable.h"  // for OperatorInfo, operatorLookup
     25#include "Common/SemanticError.h"   // for SemanticError
    2526#include "Common/utility.h"         // for toString
    2627#include "Parser/LinkageSpec.h"     // for Spec, isOverridable, AutoGen, Int...
  • src/SymTab/Validate.cc

    r97e3296 r6ac5223  
    4040#include "Validate.h"
    4141
     42#include <cassert>                     // for assertf, assert
    4243#include <cstddef>                     // for size_t
    43 #include <algorithm>                   // for move, transform
    44 #include <cassert>                     // for safe_dynamic_cast, assertf
    45 #include <iterator>                    // for back_inserter, inserter, back_...
    46 #include <list>                        // for list, _List_iterator, list<>::...
    47 #include <map>                         // for _Rb_tree_iterator, map, map<>:...
    48 #include <memory>                      // for unique_ptr, allocator
    49 #include <string>                      // for string, operator+, operator==
    50 #include <tuple>                       // for get
    51 #include <utility>                     // for pair, make_pair
    52 
    53 #include "AddVisit.h"                  // for addVisit
    54 #include "Autogen.h"                   // for SizeType, autogenerateRoutines
     44#include <list>                        // for list
     45#include <string>                      // for string
     46#include <utility>                     // for pair
     47
    5548#include "CodeGen/CodeGenerator.h"     // for genName
    5649#include "Common/PassVisitor.h"        // for PassVisitor, WithDeclsToAdd
    57 #include "Common/ScopedMap.h"          // for ScopedMap<>::const_iterator
     50#include "Common/ScopedMap.h"          // for ScopedMap
    5851#include "Common/SemanticError.h"      // for SemanticError
    5952#include "Common/UniqueName.h"         // for UniqueName
    6053#include "Common/utility.h"            // for operator+, cloneAll, deleteAll
    61 #include "Concurrency/Keywords.h"      // for applyKeywords, implementMutexF...
     54#include "Concurrency/Keywords.h"      // for applyKeywords
    6255#include "FixFunction.h"               // for FixFunction
    6356#include "Indexer.h"                   // for Indexer
    64 #include "InitTweak/InitTweak.h"       // for isCtorDtor, isCtorDtorAssign
    65 #include "Parser/LinkageSpec.h"        // for C, Cforall
    66 #include "ResolvExpr/typeops.h"        // for extractResultType, typesCompat...
    67 #include "SynTree/Attribute.h"         // for Attribute
     57#include "InitTweak/InitTweak.h"       // for isCtorDtorAssign
     58#include "Parser/LinkageSpec.h"        // for C
     59#include "ResolvExpr/typeops.h"        // for typesCompatible
     60#include "SymTab/AddVisit.h"           // for addVisit
     61#include "SymTab/Autogen.h"            // for SizeType
     62#include "SynTree/Attribute.h"         // for noAttributes, Attribute
    6863#include "SynTree/Constant.h"          // for Constant
    69 #include "SynTree/Declaration.h"       // for EnumDecl, StructDecl, UnionDecl
    70 #include "SynTree/Expression.h"        // for TypeExpr, CompoundLiteralExpr
    71 #include "SynTree/Initializer.h"       // for ListInit, Initializer, noDesig...
    72 #include "SynTree/Mutator.h"           // for mutateAll, Mutator
    73 #include "SynTree/Statement.h"         // for CompoundStmt, DeclStmt, Return...
    74 #include "SynTree/Type.h"              // for Type, TypeInstType, TraitInstType
    75 #include "SynTree/TypeSubstitution.h"  // for TypeSubstitution, applySubstit...
    76 #include "SynTree/Visitor.h"           // for acceptAll, Visitor
     64#include "SynTree/Declaration.h"       // for ObjectDecl, DeclarationWithType
     65#include "SynTree/Expression.h"        // for CompoundLiteralExpr, Expressio...
     66#include "SynTree/Initializer.h"       // for ListInit, Initializer
     67#include "SynTree/Label.h"             // for operator==, Label
     68#include "SynTree/Mutator.h"           // for Mutator
     69#include "SynTree/Type.h"              // for Type, TypeInstType, EnumInstType
     70#include "SynTree/TypeSubstitution.h"  // for TypeSubstitution
     71#include "SynTree/Visitor.h"           // for Visitor
     72
     73class CompoundStmt;
     74class ReturnStmt;
     75class SwitchStmt;
     76
    7777
    7878#define debugPrint( x ) if ( doDebug ) { std::cout << x; }
Note: See TracChangeset for help on using the changeset viewer.