Ignore:
Timestamp:
Jun 30, 2016, 4:32:56 PM (10 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, with_gc
Children:
ea29e73
Parents:
1b5c81ed (diff), 84d4d6f (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 gc_noraii

Conflicts:

Jenkinsfile
src/SymTab/Validate.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Visitor.cc

    r1b5c81ed rf80e0218  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Visitor.cc -- 
     7// Visitor.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  1 18:05:13 2016
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Apr 27 17:07:40 2016
    1313// Update Count     : 18
    1414//
     
    3939}
    4040
    41 void Visitor::visit( AggregateDecl *aggregateDecl ) {
     41void Visitor::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
    4242        acceptAll( aggregateDecl->get_parameters(), *this );
    4343        acceptAll( aggregateDecl->get_members(), *this );
     
    4545
    4646void Visitor::visit( StructDecl *aggregateDecl ) {
    47         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     47        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    4848}
    4949
    5050void Visitor::visit( UnionDecl *aggregateDecl ) {
    51         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     51        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    5252}
    5353
    5454void Visitor::visit( EnumDecl *aggregateDecl ) {
    55         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     55        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    5656}
    5757
    5858void Visitor::visit( TraitDecl *aggregateDecl ) {
    59         visit( static_cast< AggregateDecl* >( aggregateDecl ) );
    60 }
    61 
    62 void Visitor::visit( NamedTypeDecl *typeDecl ) {
     59        handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
     60}
     61
     62void Visitor::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
    6363        acceptAll( typeDecl->get_parameters(), *this );
    6464        acceptAll( typeDecl->get_assertions(), *this );
     
    6767
    6868void Visitor::visit( TypeDecl *typeDecl ) {
    69         visit( static_cast< NamedTypeDecl* >( typeDecl ) );
     69        handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
    7070}
    7171
    7272void Visitor::visit( TypedefDecl *typeDecl ) {
    73         visit( static_cast< NamedTypeDecl* >( typeDecl ) );
     73        handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
    7474}
    7575
     
    150150void Visitor::visit( DeclStmt *declStmt ) {
    151151        maybeAccept( declStmt->get_decl(), *this );
     152}
     153
     154void Visitor::visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
     155        maybeAccept( impCtorDtorStmt->get_callStmt(), *this );
    152156}
    153157
     
    284288}
    285289
     290void Visitor::visit( ImplicitCopyCtorExpr *impCpCtorExpr ) {
     291        maybeAccept( impCpCtorExpr->get_callExpr(), *this );
     292        acceptAll( impCpCtorExpr->get_tempDecls(), *this );
     293        acceptAll( impCpCtorExpr->get_returnDecls(), *this );
     294}
     295
    286296void Visitor::visit( UntypedValofExpr *valofExpr ) {
    287297        acceptAll( valofExpr->get_results(), *this );
     
    320330}
    321331
    322 void Visitor::visit( ReferenceToType *aggregateUseType ) {
     332void Visitor::handleReferenceToType( ReferenceToType *aggregateUseType ) {
    323333        acceptAll( aggregateUseType->get_forall(), *this );
    324334        acceptAll( aggregateUseType->get_parameters(), *this );
     
    326336
    327337void Visitor::visit( StructInstType *aggregateUseType ) {
    328         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     338        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    329339}
    330340
    331341void Visitor::visit( UnionInstType *aggregateUseType ) {
    332         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     342        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    333343}
    334344
    335345void Visitor::visit( EnumInstType *aggregateUseType ) {
    336         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     346        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    337347}
    338348
    339349void Visitor::visit( TraitInstType *aggregateUseType ) {
    340         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     350        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    341351        acceptAll( aggregateUseType->get_members(), *this );
    342352}
    343353
    344354void Visitor::visit( TypeInstType *aggregateUseType ) {
    345         visit( static_cast< ReferenceToType * >( aggregateUseType ) );
     355        handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
    346356}
    347357
     
    379389}
    380390
     391void Visitor::visit( ConstructorInit *ctorInit ) {
     392        maybeAccept( ctorInit->get_ctor(), *this );
     393        maybeAccept( ctorInit->get_init(), *this );
     394}
     395
    381396void Visitor::visit( Subrange *subrange ) {}
    382397
Note: See TracChangeset for help on using the changeset viewer.