Changeset 11f95ee


Ignore:
Timestamp:
Feb 17, 2017, 2:20:40 PM (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:
8a5cad8
Parents:
32b8144 (diff), 317450e (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' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r32b8144 r11f95ee  
    8787                status_prefix = 'Documentation'
    8888
    89                 // sh 'make -C src/benchmark csv-data >> /u/cforall/public_html/perf-history/concurrency.csv'
     89                // //We can't just write to a file outside our repo
     90                // //Copy the file locally using ssh
     91                // sh 'scp plg2.cs.uwaterloo.ca:/u/cforall/public_html/perf-history/concurrency.csv bench.csv'
     92
     93                // //Then append to the local file
     94                // sh 'make -C src/benchmark csv-data >> bench.csv'
     95
     96                // //Then publish the file again
     97                // sh 'scp bench.csv plg2.cs.uwaterloo.ca:/u/cforall/public_html/perf-history/concurrency.csv'         
    9098}
    9199
     
    172180                                        ]])
    173181
     182                                bIsSandbox = env.BRANCH_NAME == "jenkins-sandbox"
    174183                                bIsFullBuild = isFullBuild == 'true'
    175184                                architectureFlag = ''
     
    224233
    225234                //Send email with final results if this is not a full build
    226                 if( !bIsFullBuild ) {
     235                if( !bIsFullBuild && !bIsSandbox ) {
    227236                        echo 'Notifying users of result'
    228237                        email(currentBuild.result, log_needed)
  • src/CodeGen/CodeGenerator.cc

    r32b8144 r11f95ee  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 15:05:18 2017
    13 // Update Count     : 417
     12// Last Modified On : Thu Feb 16 14:56:29 2017
     13// Update Count     : 418
    1414//
    1515
     
    141141                } // if
    142142                output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), pretty );
    143 
    144                 // how to get this to the Functype?
    145                 std::list< Declaration * > olds = functionDecl->get_oldDecls();
    146                 if ( ! olds.empty() ) {
    147                         output << " /* function has old declaration */";
    148                 } // if
    149143
    150144                asmName( functionDecl );
  • src/GenPoly/Box.cc

    r32b8144 r11f95ee  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 29 21:43:03 2016
    13 // Update Count     : 296
     12// Last Modified On : Thu Feb 16 14:57:16 2017
     13// Update Count     : 297
    1414//
    1515
     
    263263        DeclarationWithType *LayoutFunctionBuilder::mutate( FunctionDecl *functionDecl ) {
    264264                functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
    265                 mutateAll( functionDecl->get_oldDecls(), *this );
    266265                ++functionNesting;
    267266                functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
  • src/InitTweak/FixInit.cc

    r32b8144 r11f95ee  
    1010// Created On       : Wed Jan 13 16:29:30 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:41:15 2016
    13 // Update Count     : 34
     12// Last Modified On : Thu Feb 16 14:58:43 2017
     13// Update Count     : 35
    1414//
    1515
     
    839839                void handleFuncDecl( FunctionDecl * funcDecl, Visitor & visitor ) {
    840840                        maybeAccept( funcDecl->get_functionType(), visitor );
    841                         acceptAll( funcDecl->get_oldDecls(), visitor );
    842841                        maybeAccept( funcDecl->get_statements(), visitor );
    843842                }
  • src/InitTweak/GenInit.cc

    r32b8144 r11f95ee  
    99// Author           : Rob Schluntz
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 11:37:48 2016
    13 // Update Count     : 166
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Feb 16 14:57:53 2017
     13// Update Count     : 167
    1414//
    1515
     
    320320                }
    321321                // parameters should not be constructed and destructed, so don't mutate FunctionType
    322                 mutateAll( functionDecl->get_oldDecls(), *this );
    323322                functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
    324323
  • src/Parser/DeclarationNode.cc

    r32b8144 r11f95ee  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 15:54:59 2017
    13 // Update Count     : 742
     12// Last Modified On : Thu Feb 16 13:06:50 2017
     13// Update Count     : 753
    1414//
    1515
     
    913913        SemanticError errors;
    914914        std::back_insert_iterator< std::list< Declaration * > > out( outputList );
    915         const DeclarationNode * cur = firstNode;
    916 
    917         while ( cur ) {
     915
     916        for ( const DeclarationNode * cur = firstNode; cur; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ) ) {
    918917                try {
    919918                        if ( DeclarationNode * extr = cur->extractAggregate() ) {
     
    936935                        errors.append( e );
    937936                } // try
    938                 cur = dynamic_cast< DeclarationNode * >( cur->get_next() );
    939937        } // while
    940938
     
    947945        SemanticError errors;
    948946        std::back_insert_iterator< std::list< DeclarationWithType * > > out( outputList );
    949         const DeclarationNode * cur = firstNode;
    950         while ( cur ) {
     947       
     948        for ( const DeclarationNode * cur = firstNode; cur; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ) ) {
    951949                try {
    952950                        Declaration * decl = cur->build();
     
    972970                        errors.append( e );
    973971                } // try
    974                 cur = dynamic_cast< DeclarationNode * >( cur->get_next() );
    975         } // while
     972        } // for
     973
    976974        if ( ! errors.isEmpty() ) {
    977975                throw errors;
  • src/Parser/ParseNode.h

    r32b8144 r11f95ee  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 14:45:28 2017
    13 // Update Count     : 658
     12// Last Modified On : Thu Feb 16 13:15:55 2017
     13// Update Count     : 661
    1414//
    1515
     
    437437template< typename SynTreeType, typename NodeType >
    438438void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > &outputList ) {
    439         buildList(firstNode, outputList);
     439        buildList( firstNode, outputList );
    440440        delete firstNode;
    441441}
  • src/Parser/TypeData.cc

    r32b8144 r11f95ee  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jan 27 15:28:56 2017
    13 // Update Count     : 428
     12// Last Modified On : Thu Feb 16 15:06:59 2017
     13// Update Count     : 455
    1414//
    1515
     
    724724Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, ConstantExpr *asmName, Initializer * init, std::list< Attribute * > attributes ) {
    725725        if ( td->kind == TypeData::Function ) {
     726                if ( td->function.idList ) {
     727                        buildKRFunction( td->function );
     728                } // if
     729
    726730                FunctionDecl * decl;
    727731                if ( td->function.hasBody ) {
     
    738742                        decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), nullptr, isInline, isNoreturn, attributes );
    739743                } // if
    740                 for ( DeclarationNode * cur = td->function.idList; cur != nullptr; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
    741                         if ( cur->name ) {
    742                                 decl->get_oldIdents().insert( decl->get_oldIdents().end(), *cur->name );
    743                         } // if
    744                 } // for
    745                 buildList( td->function.oldDeclList, decl->get_oldDecls() );
    746744                return decl->set_asmName( asmName );
    747745        } else if ( td->kind == TypeData::Aggregate ) {
     
    778776} // buildFunction
    779777
     778void buildKRFunction( const TypeData::Function_t & function ) {
     779        assert( ! function.params );
     780        for ( DeclarationNode * decl = function.oldDeclList; decl != nullptr; decl = dynamic_cast< DeclarationNode* >( decl->get_next() ) ) {
     781                for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode* >( param->get_next() ) ) {
     782                        if ( *decl->name == *param->name ) {
     783                                if ( param->type ) throw SemanticError( string( "duplicate declaration name " ) + *param->name );
     784                                if ( ! decl->type ) throw SemanticError( string( "duplicate parameter name " ) + *param->name );
     785                                param->type = decl->type;
     786                                decl->type = nullptr;
     787                                param->attributes.splice( param->attributes.end(), decl->attributes );
     788                        } // if
     789                } // for
     790                if ( decl->type ) throw SemanticError( string( "missing name in parameter list " ) + *decl->name );
     791        } // for
     792        for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode* >( param->get_next() ) ) {
     793                if ( ! param->type ) {
     794                        param->type = new TypeData( TypeData::Basic );
     795                        param->type->basictype = DeclarationNode::Int;
     796                } // if
     797        } // for
     798
     799        function.params = function.idList;
     800        function.idList = nullptr;
     801        delete function.oldDeclList;
     802        function.oldDeclList = nullptr;
     803} // buildKRFunction
     804
    780805// Local Variables: //
    781806// tab-width: 4 //
  • src/Parser/TypeData.h

    r32b8144 r11f95ee  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  2 17:02:09 2017
    13 // Update Count     : 146
     12// Last Modified On : Thu Feb 16 14:30:05 2017
     13// Update Count     : 153
    1414//
    1515
     
    5252
    5353        struct Function_t {
    54                 DeclarationNode * params;
    55                 DeclarationNode * idList;                                               // old-style
    56                 DeclarationNode * oldDeclList;
     54                mutable DeclarationNode * params;                               // mutables modified in buildKRFunction
     55                mutable DeclarationNode * idList;                               // old-style
     56                mutable DeclarationNode * oldDeclList;
    5757                StatementNode * body;
    5858                bool hasBody;
     
    113113Declaration * buildDecl( const TypeData *, const std::string &, DeclarationNode::StorageClass, Expression *, bool isInline, bool isNoreturn, LinkageSpec::Spec, ConstantExpr *asmName, Initializer * init = nullptr, std::list< class Attribute * > attributes = std::list< class Attribute * >() );
    114114FunctionType * buildFunction( const TypeData * );
     115void buildKRFunction( const TypeData::Function_t & function );
    115116
    116117#endif // TYPEDATA_H
  • src/SymTab/Autogen.cc

    r32b8144 r11f95ee  
    1010// Created On       : Thu Mar 03 15:45:56 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  2 18:04:40 2017
    13 // Update Count     : 11
     12// Last Modified On : Thu Feb 16 15:02:50 2017
     13// Update Count     : 13
    1414//
    1515
     
    658658
    659659                maybeAccept( functionDecl->get_functionType(), *this );
    660                 acceptAll( functionDecl->get_oldDecls(), *this );
    661660                functionNesting += 1;
    662661                maybeAccept( functionDecl->get_statements(), *this );
     
    752751        DeclarationWithType * AutogenTupleRoutines::mutate( FunctionDecl *functionDecl ) {
    753752                functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
    754                 mutateAll( functionDecl->get_oldDecls(), *this );
    755753                functionNesting += 1;
    756754                functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
  • src/SymTab/Indexer.cc

    r32b8144 r11f95ee  
    1010// Created On       : Sun May 17 21:37:33 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:47:47 2016
    13 // Update Count     : 12
     12// Last Modified On : Thu Feb 16 14:59:19 2017
     13// Update Count     : 13
    1414//
    1515
     
    236236                enterScope();
    237237                maybeAccept( functionDecl->get_functionType(), *this );
    238                 acceptAll( functionDecl->get_oldDecls(), *this );
    239238                maybeAccept( functionDecl->get_statements(), *this );
    240239                leaveScope();
  • src/SynTree/Declaration.h

    r32b8144 r11f95ee  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 14:27:08 2017
    13 // Update Count     : 56
     12// Last Modified On : Thu Feb 16 14:53:35 2017
     13// Update Count     : 57
    1414//
    1515
     
    140140        CompoundStmt *get_statements() const { return statements; }
    141141        void set_statements( CompoundStmt *newValue ) { statements = newValue; }
    142         std::list< std::string >& get_oldIdents() { return oldIdents; }
    143         std::list< Declaration* >& get_oldDecls() { return oldDecls; }
    144142
    145143        virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); }
     
    151149        FunctionType *type;
    152150        CompoundStmt *statements;
    153         std::list< std::string > oldIdents;
    154         std::list< Declaration* > oldDecls;
    155151};
    156152
  • src/SynTree/FunctionDecl.cc

    r32b8144 r11f95ee  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Oct  1 23:06:32 2016
    13 // Update Count     : 21
     12// Last Modified On : Thu Feb 16 15:01:52 2017
     13// Update Count     : 23
    1414//
    1515
     
    4444        delete type;
    4545        delete statements;
    46         deleteAll( oldDecls );
    4746}
    4847
     
    8483        } // if
    8584
    86         if ( ! oldIdents.empty() ) {
    87                 os << string( indent + 2, ' ' ) << "with parameter names" << endl;
    88                 for ( std::list< std::string >::const_iterator i = oldIdents.begin(); i != oldIdents.end(); ++i ) {
    89                         os << string( indent + 4, ' ' ) << *i << endl;
    90                 } // for
    91         } // if
    92 
    93         if ( ! oldDecls.empty() ) {
    94                 os << string( indent + 2, ' ' ) << "with parameter declarations" << endl;
    95                 printAll( oldDecls, os, indent + 4 );
    96         } // if
    9785        if ( statements ) {
    9886                os << string( indent + 2, ' ' ) << "with body " << endl;
  • src/SynTree/Mutator.cc

    r32b8144 r11f95ee  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 14:22:56 2017
    13 // Update Count     : 20
     12// Last Modified On : Thu Feb 16 15:02:23 2017
     13// Update Count     : 21
    1414//
    1515
     
    3838DeclarationWithType *Mutator::mutate( FunctionDecl *functionDecl ) {
    3939        functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
    40         mutateAll( functionDecl->get_oldDecls(), *this );
    4140        functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
    4241        return functionDecl;
  • src/SynTree/Visitor.cc

    r32b8144 r11f95ee  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  9 14:19:22 2017
    13 // Update Count     : 22
     12// Last Modified On : Thu Feb 16 15:01:25 2017
     13// Update Count     : 23
    1414//
    1515
     
    3535void Visitor::visit( FunctionDecl *functionDecl ) {
    3636        maybeAccept( functionDecl->get_functionType(), *this );
    37         acceptAll( functionDecl->get_oldDecls(), *this );
    3837        maybeAccept( functionDecl->get_statements(), *this );
    3938}
  • src/tests/Makefile.am

    r32b8144 r11f95ee  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Mon Feb  6 16:10:43 2017
    14 ## Update Count     : 40
     13## Last Modified On : Thu Feb 16 15:27:50 2017
     14## Update Count     : 41
    1515###############################################################################
    1616
     
    6868        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    6969
     70KRfunctions : KRfunctions.c
     71        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     72
    7073memberCtors-ERR1: memberCtors.c
    7174        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
  • src/tests/Makefile.in

    r32b8144 r11f95ee  
    689689        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    690690
     691KRfunctions : KRfunctions.c
     692        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     693
    691694memberCtors-ERR1: memberCtors.c
    692695        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
Note: See TracChangeset for help on using the changeset viewer.