Ignore:
Timestamp:
Aug 27, 2018, 4:40:34 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b7c89aa
Parents:
f9feab8 (diff), 305581d (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' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    rf9feab8 r90152a4  
    1919#include "SynTree/Expression.h"
    2020#include "SynTree/Constant.h"
    21 #include "SynTree/TypeSubstitution.h"
     21
     22class TypeSubstitution;
    2223
    2324#include "PassVisitor.proto.h"
     
    6566        virtual void visit( TypedefDecl * typeDecl ) override final;
    6667        virtual void visit( AsmDecl * asmDecl ) override final;
     68        virtual void visit( StaticAssertDecl * assertDecl ) override final;
    6769
    6870        virtual void visit( CompoundStmt * compoundStmt ) override final;
    6971        virtual void visit( ExprStmt * exprStmt ) override final;
    7072        virtual void visit( AsmStmt * asmStmt ) override final;
     73        virtual void visit( DirectiveStmt * dirStmt ) override final;
    7174        virtual void visit( IfStmt * ifStmt ) override final;
    7275        virtual void visit( WhileStmt * whileStmt ) override final;
     
    9093        virtual void visit( NameExpr * nameExpr ) override final;
    9194        virtual void visit( CastExpr * castExpr ) override final;
     95        virtual void visit( KeywordCastExpr * castExpr ) override final;
    9296        virtual void visit( VirtualCastExpr * castExpr ) override final;
    9397        virtual void visit( AddressExpr * addressExpr ) override final;
     
    118122        virtual void visit( StmtExpr *  stmtExpr ) override final;
    119123        virtual void visit( UniqueExpr *  uniqueExpr ) override final;
     124        virtual void visit( UntypedInitExpr *  initExpr ) override final;
     125        virtual void visit( InitExpr *  initExpr ) override final;
     126        virtual void visit( DeletedExpr *  delExpr ) override final;
     127        virtual void visit( DefaultArgExpr * argExpr ) override final;
     128        virtual void visit( GenericExpr * genExpr ) override final;
    120129
    121130        virtual void visit( VoidType * basicType ) override final;
     
    124133        virtual void visit( ArrayType * arrayType ) override final;
    125134        virtual void visit( ReferenceType * referenceType ) override final;
     135        virtual void visit( QualifiedType * qualType ) override final;
    126136        virtual void visit( FunctionType * functionType ) override final;
    127137        virtual void visit( StructInstType * aggregateUseType ) override final;
     
    136146        virtual void visit( ZeroType * zeroType ) override final;
    137147        virtual void visit( OneType * oneType ) override final;
     148        virtual void visit( GlobalScopeType * globalType ) override final;
    138149
    139150        virtual void visit( Designation * designation ) override final;
     
    157168        virtual Declaration * mutate( TypedefDecl * typeDecl ) override final;
    158169        virtual AsmDecl * mutate( AsmDecl * asmDecl ) override final;
     170        virtual StaticAssertDecl * mutate( StaticAssertDecl * assertDecl ) override final;
    159171
    160172        virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) override final;
    161173        virtual Statement * mutate( ExprStmt * exprStmt ) override final;
    162174        virtual Statement * mutate( AsmStmt * asmStmt ) override final;
     175        virtual Statement * mutate( DirectiveStmt * dirStmt ) override final;
    163176        virtual Statement * mutate( IfStmt * ifStmt ) override final;
    164177        virtual Statement * mutate( WhileStmt * whileStmt ) override final;
     
    181194        virtual Expression * mutate( UntypedExpr * untypedExpr ) override final;
    182195        virtual Expression * mutate( NameExpr * nameExpr ) override final;
    183         virtual Expression * mutate( AddressExpr * castExpr ) override final;
     196        virtual Expression * mutate( AddressExpr * addrExpr ) override final;
    184197        virtual Expression * mutate( LabelAddressExpr * labAddressExpr ) override final;
    185198        virtual Expression * mutate( CastExpr * castExpr ) override final;
     199        virtual Expression * mutate( KeywordCastExpr * castExpr ) override final;
    186200        virtual Expression * mutate( VirtualCastExpr * castExpr ) override final;
    187201        virtual Expression * mutate( UntypedMemberExpr * memberExpr ) override final;
     
    210224        virtual Expression * mutate( StmtExpr *  stmtExpr ) override final;
    211225        virtual Expression * mutate( UniqueExpr *  uniqueExpr ) override final;
     226        virtual Expression * mutate( UntypedInitExpr *  initExpr ) override final;
     227        virtual Expression * mutate( InitExpr *  initExpr ) override final;
     228        virtual Expression * mutate( DeletedExpr *  delExpr ) override final;
     229        virtual Expression * mutate( DefaultArgExpr * argExpr ) override final;
     230        virtual Expression * mutate( GenericExpr * genExpr ) override final;
    212231
    213232        virtual Type * mutate( VoidType * basicType ) override final;
     
    216235        virtual Type * mutate( ArrayType * arrayType ) override final;
    217236        virtual Type * mutate( ReferenceType * referenceType ) override final;
     237        virtual Type * mutate( QualifiedType * qualType ) override final;
    218238        virtual Type * mutate( FunctionType * functionType ) override final;
    219239        virtual Type * mutate( StructInstType * aggregateUseType ) override final;
     
    228248        virtual Type * mutate( ZeroType * zeroType ) override final;
    229249        virtual Type * mutate( OneType * oneType ) override final;
     250        virtual Type * mutate( GlobalScopeType * globalType ) override final;
    230251
    231252        virtual Designation * mutate( Designation * designation ) override final;
     
    243264
    244265private:
     266        bool inFunction = false;
     267
    245268        template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
    246269        template<typename pass_t> friend void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
     
    286309        bool_ref * get_visit_children_ptr() { return visit_children_impl(pass, 0); }
    287310
    288         void indexerScopeEnter  ()                             { indexer_impl_enterScope  ( pass, 0       ); }
    289         void indexerScopeLeave  ()                             { indexer_impl_leaveScope  ( pass, 0       ); }
    290         void indexerAddId       ( DeclarationWithType * node ) { indexer_impl_addId       ( pass, 0, node ); }
    291         void indexerAddType     ( NamedTypeDecl       * node ) { indexer_impl_addType     ( pass, 0, node ); }
    292         void indexerAddStruct   ( const std::string   & id   ) { indexer_impl_addStruct   ( pass, 0, id   ); }
    293         void indexerAddStruct   ( StructDecl          * node ) { indexer_impl_addStruct   ( pass, 0, node ); }
    294         void indexerAddStructFwd( StructDecl          * node ) { indexer_impl_addStructFwd( pass, 0, node ); }
    295         void indexerAddEnum     ( EnumDecl            * node ) { indexer_impl_addEnum     ( pass, 0, node ); }
    296         void indexerAddUnion    ( const std::string   & id   ) { indexer_impl_addUnion    ( pass, 0, id   ); }
    297         void indexerAddUnion    ( UnionDecl           * node ) { indexer_impl_addUnion    ( pass, 0, node ); }
    298         void indexerAddUnionFwd ( UnionDecl           * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
    299         void indexerAddTrait    ( TraitDecl           * node ) { indexer_impl_addTrait    ( pass, 0, node ); }
    300         void indexerAddWith     ( WithStmt            * node ) { indexer_impl_addWith    ( pass, 0, node ); }
     311        void indexerScopeEnter  ()                                    { indexer_impl_enterScope  ( pass, 0       ); }
     312        void indexerScopeLeave  ()                                    { indexer_impl_leaveScope  ( pass, 0       ); }
     313        void indexerAddId       ( DeclarationWithType       * node ) { indexer_impl_addId       ( pass, 0, node ); }
     314        void indexerAddType     ( NamedTypeDecl             * node ) { indexer_impl_addType     ( pass, 0, node ); }
     315        void indexerAddStruct   ( const std::string         & id    ) { indexer_impl_addStruct   ( pass, 0, id   ); }
     316        void indexerAddStruct   ( StructDecl                * node ) { indexer_impl_addStruct   ( pass, 0, node ); }
     317        void indexerAddStructFwd( StructDecl                * node ) { indexer_impl_addStructFwd( pass, 0, node ); }
     318        void indexerAddEnum     ( EnumDecl                  * node ) { indexer_impl_addEnum     ( pass, 0, node ); }
     319        void indexerAddUnion    ( const std::string         & id    ) { indexer_impl_addUnion    ( pass, 0, id   ); }
     320        void indexerAddUnion    ( UnionDecl                 * node ) { indexer_impl_addUnion    ( pass, 0, node ); }
     321        void indexerAddUnionFwd ( UnionDecl                 * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
     322        void indexerAddTrait    ( TraitDecl                 * node ) { indexer_impl_addTrait    ( pass, 0, node ); }
     323        void indexerAddWith     ( std::list< Expression * > & exprs, BaseSyntaxNode * withStmt ) { indexer_impl_addWith( pass, 0, exprs, withStmt ); }
    301324
    302325
     
    403426};
    404427
     428#include "SynTree/TypeSubstitution.h"
    405429#include "PassVisitor.impl.h"
Note: See TracChangeset for help on using the changeset viewer.