Changeset 6ac5223 for src/SymTab
- Timestamp:
- Aug 17, 2017, 3:42:21 PM (8 years ago)
- 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. - Location:
- src/SymTab
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r97e3296 r6ac5223 15 15 #include "Autogen.h" 16 16 17 #include <cstddef> // for NULL 17 18 #include <algorithm> // for count_if 18 19 #include <cassert> // for safe_dynamic_cast, assert, assertf … … 20 21 #include <list> // for list, _List_iterator, list<>::iter... 21 22 #include <set> // for set, _Rb_tree_const_iterator 23 #include <utility> // for pair 22 24 #include <vector> // for vector 23 25 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 36 35 37 36 namespace SymTab { -
src/SymTab/Autogen.h
r97e3296 r6ac5223 17 17 18 18 #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 22 20 23 21 #include "Common/UniqueName.h" // for UniqueName 24 22 #include "InitTweak/InitTweak.h" // for InitExpander 25 #include "Parser/LinkageSpec.h" // for C26 23 #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... 32 26 #include "SynTree/Type.h" // for Type, ArrayType, Type::Qualifiers 27 28 class CompoundStmt; 29 class Statement; 33 30 34 31 namespace SymTab { -
src/SymTab/FixFunction.cc
r97e3296 r6ac5223 20 20 #include "Common/utility.h" // for maybeClone 21 21 #include "SynTree/Declaration.h" // for FunctionDecl, ObjectDecl, Declarati... 22 #include "SynTree/Expression.h" // for Expression 22 23 #include "SynTree/Type.h" // for ArrayType, PointerType, Type, Basic... 23 24 -
src/SymTab/Indexer.cc
r97e3296 r6ac5223 353 353 } 354 354 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 } 355 368 356 369 void Indexer::visit( ApplicationExpr *applicationExpr ) { … … 556 569 leaveScope(); 557 570 } 558 559 void Indexer::visit( ForStmt *forStmt ) {560 // for statements introduce a level of scope561 enterScope();562 Visitor::visit( forStmt );563 leaveScope();564 }565 566 567 571 568 572 void Indexer::lookupId( const std::string &id, std::list< DeclarationWithType* > &out ) const { -
src/SymTab/Indexer.h
r97e3296 r6ac5223 45 45 46 46 virtual void visit( CompoundStmt *compoundStmt ); 47 virtual void visit( ForStmt *forStmt ); 48 virtual void visit( CatchStmt *catchStmt ); 47 49 48 50 virtual void visit( ApplicationExpr *applicationExpr ); … … 81 83 virtual void visit( StructInstType *contextInst ); 82 84 virtual void visit( UnionInstType *contextInst ); 83 84 virtual void visit( ForStmt *forStmt );85 85 86 86 // when using an indexer manually (e.g., within a mutator traversal), it is necessary to tell the indexer -
src/SymTab/Mangler.cc
r97e3296 r6ac5223 20 20 #include <iterator> // for ostream_iterator, back_insert_ite... 21 21 #include <list> // for _List_iterator, list, _List_const... 22 #include <string> // for string, operator<<, basic_string22 #include <string> // for string, char_traits, operator<< 23 23 24 24 #include "CodeGen/OperatorTable.h" // for OperatorInfo, operatorLookup 25 #include "Common/SemanticError.h" // for SemanticError 25 26 #include "Common/utility.h" // for toString 26 27 #include "Parser/LinkageSpec.h" // for Spec, isOverridable, AutoGen, Int... -
src/SymTab/Validate.cc
r97e3296 r6ac5223 40 40 #include "Validate.h" 41 41 42 #include <cassert> // for assertf, assert 42 43 #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 55 48 #include "CodeGen/CodeGenerator.h" // for genName 56 49 #include "Common/PassVisitor.h" // for PassVisitor, WithDeclsToAdd 57 #include "Common/ScopedMap.h" // for ScopedMap <>::const_iterator50 #include "Common/ScopedMap.h" // for ScopedMap 58 51 #include "Common/SemanticError.h" // for SemanticError 59 52 #include "Common/UniqueName.h" // for UniqueName 60 53 #include "Common/utility.h" // for operator+, cloneAll, deleteAll 61 #include "Concurrency/Keywords.h" // for applyKeywords , implementMutexF...54 #include "Concurrency/Keywords.h" // for applyKeywords 62 55 #include "FixFunction.h" // for FixFunction 63 56 #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 68 63 #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 73 class CompoundStmt; 74 class ReturnStmt; 75 class SwitchStmt; 76 77 77 78 78 #define debugPrint( x ) if ( doDebug ) { std::cout << x; }
Note:
See TracChangeset
for help on using the changeset viewer.