Ignore:
Timestamp:
Oct 19, 2017, 11:13:11 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
189d800
Parents:
6137fbb
git-author:
Rob Schluntz <rschlunt@…> (10/11/17 16:04:22)
git-committer:
Rob Schluntz <rschlunt@…> (10/19/17 11:13:11)
Message:

Make ReturnFixer? idempotent and rearrange passes in Validate in anticipation of autogen changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r6137fbb rbd7e609  
    153153                void previsit( ObjectDecl * object );
    154154                void previsit( FunctionDecl * func );
     155                void previsit( StructDecl * aggrDecl );
     156                void previsit( UnionDecl * aggrDecl );
    155157        };
    156158
     
    270272                acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist
    271273                VerifyCtorDtorAssign::verify( translationUnit );  // must happen before autogen, because autogen examines existing ctor/dtors
     274                ReturnChecker::checkFunctionReturns( translationUnit );
     275                InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen
    272276                Concurrency::applyKeywords( translationUnit );
     277                acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
    273278                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay
    274279                Concurrency::implementMutexFuncs( translationUnit );
    275280                Concurrency::implementThreadStarter( translationUnit );
    276                 ReturnChecker::checkFunctionReturns( translationUnit );
    277281                mutateAll( translationUnit, compoundliteral );
    278                 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines
    279282                ArrayLength::computeLength( translationUnit );
    280                 acceptAll( translationUnit, finder );
     283                acceptAll( translationUnit, finder ); // xxx - remove this pass soon
    281284                mutateAll( translationUnit, labelAddrFixer );
    282285        }
     
    620623        }
    621624
     625        void ForallPointerDecay::previsit( StructDecl * aggrDecl ) {
     626                forallFixer( aggrDecl->parameters, aggrDecl );
     627        }
     628
     629        void ForallPointerDecay::previsit( UnionDecl * aggrDecl ) {
     630                forallFixer( aggrDecl->parameters, aggrDecl );
     631        }
     632
    622633        void ReturnChecker::checkFunctionReturns( std::list< Declaration * > & translationUnit ) {
    623634                PassVisitor<ReturnChecker> checker;
Note: See TracChangeset for help on using the changeset viewer.