Ignore:
Timestamp:
Oct 19, 2017, 12:01:04 PM (8 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:
837ce06
Parents:
b96ec83 (diff), a15b72c (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/SymTab/Validate.cc

    rb96ec83 r6840e7c  
    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 );
    279282                ArrayLength::computeLength( translationUnit );
    280                 acceptAll( translationUnit, finder );
     283                acceptAll( translationUnit, finder ); // xxx - remove this pass soon
    281284                mutateAll( translationUnit, labelAddrFixer );
    282285        }
     
    369372                        DWTIterator begin( dwts.begin() ), end( dwts.end() );
    370373                        if ( begin == end ) return;
    371                         FixFunction fixer;
     374                        PassVisitor<FixFunction> fixer;
    372375                        DWTIterator i = begin;
    373376                        *i = (*i)->acceptMutator( fixer );
    374                         if ( fixer.get_isVoid() ) {
     377                        if ( fixer.pass.isVoid ) {
    375378                                DWTIterator j = i;
    376379                                ++i;
     
    383386                                ++i;
    384387                                for ( ; i != end; ++i ) {
    385                                         FixFunction fixer;
     388                                        PassVisitor<FixFunction> fixer;
    386389                                        *i = (*i)->acceptMutator( fixer );
    387                                         if ( fixer.get_isVoid() ) {
     390                                        if ( fixer.pass.isVoid ) {
    388391                                                throw SemanticError( "invalid type void in function type ", func );
    389392                                        } // if
     
    597600                        // apply FixFunction to every assertion to check for invalid void type
    598601                        for ( DeclarationWithType *& assertion : type->assertions ) {
    599                                 FixFunction fixer;
     602                                PassVisitor<FixFunction> fixer;
    600603                                assertion = assertion->acceptMutator( fixer );
    601                                 if ( fixer.get_isVoid() ) {
     604                                if ( fixer.pass.isVoid ) {
    602605                                        throw SemanticError( "invalid type void in assertion of function ", node );
    603606                                } // if
     
    618621                forallFixer( func->type->forall, func );
    619622                func->fixUniqueId();
     623        }
     624
     625        void ForallPointerDecay::previsit( StructDecl * aggrDecl ) {
     626                forallFixer( aggrDecl->parameters, aggrDecl );
     627        }
     628
     629        void ForallPointerDecay::previsit( UnionDecl * aggrDecl ) {
     630                forallFixer( aggrDecl->parameters, aggrDecl );
    620631        }
    621632
Note: See TracChangeset for help on using the changeset viewer.