Changes in / [5c4a473:d65f92c]


Ignore:
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r5c4a473 rd65f92c  
    132132
    133133<img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=0" >
    134 <img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=1" >
    135134
    136135<p>- Logs ----------------------------------------------------------------</p>
  • Jenkinsfile

    r5c4a473 rd65f92c  
    197197                if( Settings.Publish && !Settings.RunBenchmark ) { echo 'No results to publish!!!' }
    198198
    199                 def groupCompile = new PlotGroup('Compilation', 'duration (s) - lower is better', true)
    200                 def groupConcurrency = new PlotGroup('Concurrency', 'duration (n) - lower is better', false)
     199                def groupCompile = new PlotGroup('Compilation', 'seconds', true)
     200                def groupConcurrency = new PlotGroup('Concurrency', 'nanoseconds', false)
    201201
    202202                //Then publish the results
    203                 do_plot(Settings.RunBenchmark && Settings.Publish, 'compile'       , groupCompile    , false, 'Compilation')
    204                 do_plot(Settings.RunBenchmark && Settings.Publish, 'compile.diff'  , groupCompile    , true , 'Compilation (relative)')
    205                 do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch'     , groupConcurrency, false, 'Context Switching')
    206                 do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch.diff', groupConcurrency, true , 'Context Switching (relative)')
    207                 do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex'         , groupConcurrency, false, 'Mutual Exclusion')
    208                 do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex.diff'    , groupConcurrency, true , 'Mutual Exclusion (relative)')
    209                 do_plot(Settings.RunBenchmark && Settings.Publish, 'signal'        , groupConcurrency, false, 'Internal and External Scheduling')
    210                 do_plot(Settings.RunBenchmark && Settings.Publish, 'signal.diff'   , groupConcurrency, true , 'Internal and External Scheduling (relative)')
     203                do_plot(Settings.RunBenchmark && Settings.Publish, 'compile'       , groupCompile    , 'Compilation')
     204                do_plot(Settings.RunBenchmark && Settings.Publish, 'compile.diff'  , groupCompile    , 'Compilation Speed-Up')
     205                do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch'     , groupConcurrency, 'Context Switching')
     206                do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch.diff', groupConcurrency, 'Context Switching Speed-Up')
     207                do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex'         , groupConcurrency, 'Mutual Exclusion')
     208                do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex.diff'    , groupConcurrency, 'Mutual Exclusion Speed-Up')
     209                do_plot(Settings.RunBenchmark && Settings.Publish, 'signal'        , groupConcurrency, 'Internal and External Scheduling')
     210                do_plot(Settings.RunBenchmark && Settings.Publish, 'signal.diff'   , groupConcurrency, 'Internal and External Scheduling Speed-Up')
    211211        }
    212212}
     
    466466}
    467467
    468 def do_plot(boolean new_data, String file, PlotGroup group, boolean relative, String title) {
     468def do_plot(boolean new_data, String file, PlotGroup group, String title) {
    469469
    470470        if(new_data) {
     
    489489                        exclZero: false,
    490490                        keepRecords: false,
    491                         logarithmic: !relative && group.log,
     491                        logarithmic: group.log,
    492492                        numBuilds: '120',
    493493                        useDescr: true,
  • libcfa/src/Makefile.am

    r5c4a473 rd65f92c  
    2626VPATH += :../prelude
    2727
    28 gdbwaittarget=""
    29 
    3028# AM_CFLAGS for all cfa source
    3129# AM_CFAFLAGS for only cfa source
    3230# use -no-include-stdhdr to prevent rebuild cycles
    3331# The built sources must not depend on the installed headers
    34 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     32AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
    3533AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3634AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
  • libcfa/src/Makefile.in

    r5c4a473 rd65f92c  
    438438am__v_UPP_1 =
    439439lib_LTLIBRARIES = libcfa.la libcfathread.la
    440 gdbwaittarget = ""
    441440
    442441# AM_CFLAGS for all cfa source
     
    444443# use -no-include-stdhdr to prevent rebuild cycles
    445444# The built sources must not depend on the installed headers
    446 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     445AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
    447446AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    448447AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
  • src/ResolvExpr/AlternativeFinder.cc

    r5c4a473 rd65f92c  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sat May 16 23:52:08 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug  8 16:35:00 2019
    13 // Update Count     : 38
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 25 22:37:46 2019
     13// Update Count     : 37
    1414//
    1515
     
    377377        }
    378378
    379         Cost computeConversionCost( Type * actualType, Type * formalType, bool actualIsLvalue,
    380                         const SymTab::Indexer &indexer, const TypeEnvironment & env ) {
     379        Cost computeConversionCost( Type * actualType, Type * formalType, const SymTab::Indexer &indexer, const TypeEnvironment & env ) {
    381380                PRINT(
    382381                        std::cerr << std::endl << "converting ";
     
    388387                        std::cerr << std::endl;
    389388                )
    390                 Cost convCost = conversionCost( actualType, formalType, actualIsLvalue, indexer, env );
     389                Cost convCost = conversionCost( actualType, formalType, indexer, env );
    391390                PRINT(
    392391                        std::cerr << std::endl << "cost is " << convCost << std::endl;
     
    403402
    404403        Cost computeExpressionConversionCost( Expression *& actualExpr, Type * formalType, const SymTab::Indexer &indexer, const TypeEnvironment & env ) {
    405                 Cost convCost = computeConversionCost(
    406                         actualExpr->result, formalType, actualExpr->get_lvalue(), indexer, env );
     404                Cost convCost = computeConversionCost( actualExpr->result, formalType, indexer, env );
    407405
    408406                // if there is a non-zero conversion cost, ignoring poly cost, then the expression requires conversion.
     
    11881186                assert( toType );
    11891187                toType = resolveTypeof( toType, indexer );
    1190                 assert(!dynamic_cast<TypeofType *>(toType));
    11911188                SymTab::validateType( toType, &indexer );
    11921189                adjustExprType( toType, env, indexer );
     
    12151212                        unify( castExpr->result, alt.expr->result, alt.env, needAssertions,
    12161213                                haveAssertions, openVars, indexer );
    1217                         Cost thisCost = castCost( alt.expr->result, castExpr->result, alt.expr->get_lvalue(),
    1218                                 indexer, alt.env );
     1214                        Cost thisCost = castCost( alt.expr->result, castExpr->result, indexer,
     1215                                alt.env );
    12191216                        PRINT(
    12201217                                std::cerr << "working on cast with result: " << castExpr->result << std::endl;
     
    16431640                                // xxx - do some inspecting on this line... why isn't result bound to initAlt.type?
    16441641
    1645                                 Cost thisCost = castCost( alt.expr->result, toType, alt.expr->get_lvalue(),
    1646                                         indexer, newEnv );
     1642                                Cost thisCost = castCost( alt.expr->result, toType, indexer, newEnv );
    16471643                                if ( thisCost != Cost::infinity ) {
    16481644                                        // count one safe conversion for each value that is thrown away
  • src/ResolvExpr/CastCost.cc

    r5c4a473 rd65f92c  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 06:57:43 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug  8 16:12:00 2019
    13 // Update Count     : 8
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Feb  2 15:34:36 2016
     13// Update Count     : 7
    1414//
    1515
     
    3737        struct CastCost_old : public ConversionCost {
    3838          public:
    39                 CastCost_old( const Type * dest, bool srcIsLvalue,
    40                         const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc );
     39                CastCost_old( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc );
    4140
    4241                using ConversionCost::previsit;
     
    4645        };
    4746
    48         Cost castCost( const Type * src, const Type * dest, bool srcIsLvalue,
    49                         const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
     47        Cost castCost( const Type * src, const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
    5048                if ( const TypeInstType * destAsTypeInst = dynamic_cast< const TypeInstType * >( dest ) ) {
    5149                        if ( const EqvClass * eqvClass = env.lookup( destAsTypeInst->name ) ) {
    5250                                if ( eqvClass->type ) {
    53                                         return castCost( src, eqvClass->type, srcIsLvalue, indexer, env );
     51                                        return castCost( src, eqvClass->type, indexer, env );
    5452                                } else {
    5553                                        return Cost::infinity;
     
    5957                                const TypeDecl * type = strict_dynamic_cast< const TypeDecl * >( namedType );
    6058                                if ( type->base ) {
    61                                         return castCost( src, type->base, srcIsLvalue, indexer, env ) + Cost::safe;
     59                                        return castCost( src, type->base, indexer, env ) + Cost::safe;
    6260                                } // if
    6361                        } // if
     
    8078                } else if ( const ReferenceType * refType = dynamic_cast< const ReferenceType * > ( dest ) ) {
    8179                        PRINT( std::cerr << "conversionCost: dest is reference" << std::endl; )
    82                         return convertToReferenceCost( src, refType, srcIsLvalue, indexer, env, [](const Type * t1, const Type * t2, const SymTab::Indexer & indexer, const TypeEnvironment & env ) {
     80                        return convertToReferenceCost( src, refType, indexer, env, [](const Type * t1, const Type * t2, const SymTab::Indexer & indexer, const TypeEnvironment & env ) {
    8381                                return ptrsCastable( t1, t2, env, indexer );
    8482                        });
    8583                } else {
    8684                        PassVisitor<CastCost_old> converter(
    87                                 dest, srcIsLvalue, indexer, env,
    88                                 (Cost (*)( const Type *, const Type *, bool, const SymTab::Indexer &, const TypeEnvironment & ))
     85                                dest, indexer, env,
     86                                (Cost (*)( const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment & ))
    8987                                        castCost );
    9088                        src->accept( converter );
     
    9896        }
    9997
    100         CastCost_old::CastCost_old( const Type * dest, bool srcIsLvalue,
    101                         const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
    102                 : ConversionCost( dest, srcIsLvalue, indexer, env, costFunc ) {
     98        CastCost_old::CastCost_old( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
     99                : ConversionCost( dest, indexer, env, costFunc ) {
    103100        }
    104101
     
    109106                        cost = Cost::unsafe;
    110107                } else {
    111                         cost = conversionCost( basicType, dest, srcIsLvalue, indexer, env );
     108                        cost = conversionCost( basicType, dest, indexer, env );
    112109                } // if
    113110        }
  • src/ResolvExpr/ConversionCost.cc

    r5c4a473 rd65f92c  
    1010// Created On       : Sun May 17 07:06:19 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Aug 12 10:21:00 2019
    13 // Update Count     : 27
     12// Last Modified On : Mon Jun 24 13:33:00 2019
     13// Update Count     : 26
    1414//
    1515
     
    4646#endif
    4747
    48         Cost conversionCost( const Type * src, const Type * dest, bool srcIsLvalue,
    49                         const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
     48        Cost conversionCost( const Type * src, const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
    5049                if ( const TypeInstType * destAsTypeInst = dynamic_cast< const TypeInstType * >( dest ) ) {
    5150                        PRINT( std::cerr << "type inst " << destAsTypeInst->name; )
    5251                        if ( const EqvClass * eqvClass = env.lookup( destAsTypeInst->name ) ) {
    5352                                if ( eqvClass->type ) {
    54                                         return conversionCost( src, eqvClass->type, srcIsLvalue, indexer, env );
     53                                        return conversionCost( src, eqvClass->type, indexer, env );
    5554                                } else {
    5655                                        return Cost::infinity;
     
    6261                                assert( type );
    6362                                if ( type->base ) {
    64                                         return conversionCost( src, type->base, srcIsLvalue, indexer, env )
    65                                                 + Cost::safe;
     63                                        return conversionCost( src, type->base, indexer, env ) + Cost::safe;
    6664                                } // if
    6765                        } // if
     
    8381                } else if ( const ReferenceType * refType = dynamic_cast< const ReferenceType * > ( dest ) ) {
    8482                        PRINT( std::cerr << "conversionCost: dest is reference" << std::endl; )
    85                         return convertToReferenceCost( src, refType, srcIsLvalue, indexer, env, [](const Type * const t1, const Type * t2, const SymTab::Indexer &, const TypeEnvironment & env ){
     83                        return convertToReferenceCost( src, refType, indexer, env, [](const Type * const t1, const Type * t2, const SymTab::Indexer &, const TypeEnvironment & env ){
    8684                                return ptrsAssignable( t1, t2, env );
    8785                        });
    8886                } else {
    8987                        PassVisitor<ConversionCost> converter(
    90                                 dest, srcIsLvalue, indexer, env,
    91                                 (Cost (*)(const Type *, const Type *, bool, const SymTab::Indexer&, const TypeEnvironment&))
     88                                dest, indexer, env,
     89                                (Cost (*)(const Type *, const Type *, const SymTab::Indexer&, const TypeEnvironment&))
    9290                                        conversionCost );
    9391                        src->accept( converter );
     
    10098        }
    10199
    102         static Cost convertToReferenceCost( const Type * src, const Type * dest, bool srcIsLvalue,
    103                         int diff, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func ) {
     100        static Cost convertToReferenceCost( const Type * src, const Type * dest, int diff, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func ) {
    104101                PRINT( std::cerr << "convert to reference cost... diff " << diff << " " << src << " / " << dest << std::endl; )
    105102                if ( diff > 0 ) {
    106103                        // TODO: document this
    107                         Cost cost = convertToReferenceCost(
    108                                 strict_dynamic_cast< const ReferenceType * >( src )->base, dest, srcIsLvalue,
    109                                 diff-1, indexer, env, func );
     104                        Cost cost = convertToReferenceCost( strict_dynamic_cast< const ReferenceType * >( src )->base, dest, diff-1, indexer, env, func );
    110105                        cost.incReference();
    111106                        return cost;
    112107                } else if ( diff < -1 ) {
    113108                        // TODO: document this
    114                         Cost cost = convertToReferenceCost(
    115                                 src, strict_dynamic_cast< const ReferenceType * >( dest )->base, srcIsLvalue,
    116                                 diff+1, indexer, env, func );
     109                        Cost cost = convertToReferenceCost( src, strict_dynamic_cast< const ReferenceType * >( dest )->base, diff+1, indexer, env, func );
    117110                        cost.incReference();
    118111                        return cost;
     
    145138                                PRINT( std::cerr << "reference to rvalue conversion" << std::endl; )
    146139                                PassVisitor<ConversionCost> converter(
    147                                         dest, srcIsLvalue, indexer, env,
    148                                         (Cost (*)(const Type *, const Type *, bool, const SymTab::Indexer&, const TypeEnvironment&))
     140                                        dest, indexer, env,
     141                                        (Cost (*)(const Type *, const Type *, const SymTab::Indexer&, const TypeEnvironment&))
    149142                                                conversionCost );
    150143                                src->accept( converter );
     
    157150                        if ( typesCompatibleIgnoreQualifiers( src, destAsRef->base, indexer, env ) ) {
    158151                                PRINT( std::cerr << "converting compatible base type" << std::endl; )
    159                                 assert( src->get_lvalue() == srcIsLvalue );
    160                                 if ( srcIsLvalue ) {
     152                                if ( src->get_lvalue() ) {
    161153                                        PRINT(
    162154                                                std::cerr << "lvalue to reference conversion" << std::endl;
     
    186178        }
    187179
    188         Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, bool srcIsLvalue,
    189                         const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func ) {
     180        Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func ) {
    190181                int sdepth = src->referenceDepth(), ddepth = dest->referenceDepth();
    191                 Cost cost = convertToReferenceCost( src, dest, srcIsLvalue, sdepth-ddepth, indexer, env, func );
     182                Cost cost = convertToReferenceCost( src, dest, sdepth-ddepth, indexer, env, func );
    192183                PRINT( std::cerr << "convertToReferenceCost result: " << cost << std::endl; )
    193184                return cost;
    194185        }
    195186
    196         ConversionCost::ConversionCost( const Type * dest, bool srcIsLvalue, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
    197                 : dest( dest ), srcIsLvalue( srcIsLvalue ), indexer( indexer ), cost( Cost::infinity ), env( env ), costFunc( costFunc ) {
     187        ConversionCost::ConversionCost( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction costFunc )
     188                : dest( dest ), indexer( indexer ), cost( Cost::infinity ), env( env ), costFunc( costFunc ) {
    198189        }
    199190
     
    380371                // recursively compute conversion cost from T1 to T2.
    381372                // cv can be safely dropped because of 'implicit dereference' behavior.
    382                 cost = costFunc( refType->base, dest, srcIsLvalue, indexer, env );
     373                cost = costFunc( refType->base, dest, indexer, env );
    383374                if ( refType->base->tq == dest->tq ) {
    384375                        cost.incReference();  // prefer exact qualifiers
     
    412403                static Type::Qualifiers q;
    413404                static BasicType integer( q, BasicType::SignedInt );
    414                 cost = costFunc( &integer, dest, srcIsLvalue, indexer, env );  // safe if dest >= int
     405                cost = costFunc( &integer, dest, indexer, env );  // safe if dest >= int
    415406                if ( cost < Cost::unsafe ) {
    416407                        cost.incSafe();
     
    422413        void ConversionCost::postvisit( const TypeInstType * inst ) {
    423414                if ( const EqvClass * eqvClass = env.lookup( inst->name ) ) {
    424                         cost = costFunc( eqvClass->type, dest, srcIsLvalue, indexer, env );
     415                        cost = costFunc( eqvClass->type, dest, indexer, env );
    425416                } else if ( const TypeInstType * destAsInst = dynamic_cast< const TypeInstType * >( dest ) ) {
    426417                        if ( inst->name == destAsInst->name ) {
     
    432423                        assert( type );
    433424                        if ( type->base ) {
    434                                 cost = costFunc( type->base, dest, srcIsLvalue, indexer, env ) + Cost::safe;
     425                                cost = costFunc( type->base, dest, indexer, env ) + Cost::safe;
    435426                        } // if
    436427                } // if
     
    443434                        std::list< Type * >::const_iterator destIt = destAsTuple->types.begin();
    444435                        while ( srcIt != tupleType->types.end() && destIt != destAsTuple->types.end() ) {
    445                                 Cost newCost = costFunc( * srcIt++, * destIt++, srcIsLvalue, indexer, env );
     436                                Cost newCost = costFunc( * srcIt++, * destIt++, indexer, env );
    446437                                if ( newCost == Cost::infinity ) {
    447438                                        return;
  • src/ResolvExpr/ConversionCost.h

    r5c4a473 rd65f92c  
    1010// Created On       : Sun May 17 09:37:28 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug  8 16:13:00 2019
    13 // Update Count     : 6
     12// Last Modified On : Mon Jun 24 10:00:00 2019
     13// Update Count     : 5
    1414//
    1515
     
    3333        class TypeEnvironment;
    3434
    35         typedef std::function<Cost(const Type *, const Type *, bool,
    36                 const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;
    37 
     35        typedef std::function<Cost(const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;
    3836        struct ConversionCost : public WithShortCircuiting {
    3937          public:
    40                 ConversionCost( const Type * dest, bool srcIsLvalue,
    41                         const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );
     38                ConversionCost( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );
    4239
    4340                Cost get_cost() const { return cost; }
     
    6259          protected:
    6360                const Type * dest;
    64                 bool srcIsLvalue;
    6561                const SymTab::Indexer &indexer;
    6662                Cost cost;
     
    7066
    7167        typedef std::function<int(const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment &)> PtrsFunction;
    72         Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, bool srcIsLvalue,
    73                 const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );
     68        Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );
    7469
    7570// Some function pointer types, differ in return type.
  • src/ResolvExpr/ResolveAssertions.cc

    r5c4a473 rd65f92c  
    99// Author           : Aaron B. Moss
    1010// Created On       : Fri Oct 05 13:46:00 2018
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug  8 16:47:00 2019
    13 // Update Count     : 3
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Jul 10 16:10:37 2019
     13// Update Count     : 2
    1414//
    1515
     
    156156                        for ( const auto& assn : x.assns ) {
    157157                                // compute conversion cost from satisfying decl to assertion
    158                                 assert( !assn.match.adjType->get_lvalue() );
    159158                                k += computeConversionCost(
    160                                         assn.match.adjType, assn.decl->get_type(), false, indexer, x.env );
     159                                        assn.match.adjType, assn.decl->get_type(), indexer, x.env );
    161160
    162161                                // mark vars+specialization cost on function-type assertions
  • src/ResolvExpr/typeops.h

    r5c4a473 rd65f92c  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 07:28:22 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug  8 16:36:00 2019
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Feb  8 09:30:34 2019
     13// Update Count     : 4
    1414//
    1515
     
    8080
    8181        // in CastCost.cc
    82         Cost castCost( const Type * src, const Type * dest, bool srcIsLvalue,
    83                 const SymTab::Indexer & indexer, const TypeEnvironment & env );
     82        Cost castCost( const Type * src, const Type * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env );
    8483        Cost castCost(
    8584                const ast::Type * src, const ast::Type * dst, const ast::SymbolTable & symtab,
     
    8786
    8887        // in ConversionCost.cc
    89         Cost conversionCost( const Type * src, const Type * dest, bool srcIsLvalue,
    90                 const SymTab::Indexer & indexer, const TypeEnvironment & env );
     88        Cost conversionCost( const Type * src, const Type * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env );
    9189        Cost conversionCost(
    9290                const ast::Type * src, const ast::Type * dst, const ast::SymbolTable & symtab,
     
    9492
    9593        // in AlternativeFinder.cc
    96         Cost computeConversionCost( Type * actualType, Type * formalType, bool actualIsLvalue,
     94        Cost computeConversionCost( Type * actualType, Type * formalType,
    9795                const SymTab::Indexer & indexer, const TypeEnvironment & env );
    9896
  • src/SynTree/ApplicationExpr.cc

    r5c4a473 rd65f92c  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Aug 12 14:28:00 2019
    13 // Update Count     : 5
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Tue Apr 26 12:41:06 2016
     13// Update Count     : 4
    1414//
    1515
     
    7676}
    7777
    78 bool ApplicationExpr::get_lvalue() const {
    79         return result->get_lvalue();
    80 }
    81 
    8278void ApplicationExpr::print( std::ostream &os, Indenter indent ) const {
    8379        os << "Application of" << std::endl << indent+1;
  • src/SynTree/CommaExpr.cc

    r5c4a473 rd65f92c  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Arg 12 16:11:00 2016
    13 // Update Count     : 2
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Mon May 02 15:19:44 2016
     13// Update Count     : 1
    1414//
    1515
     
    3939}
    4040
    41 bool CommaExpr::get_lvalue() const {
    42         // xxx - as above, shouldn't be an lvalue but that information is used anyways.
    43         return result->get_lvalue();
    44 }
    45 
    4641void CommaExpr::print( std::ostream &os, Indenter indent ) const {
    4742        os << "Comma Expression:" << std::endl;
  • src/SynTree/Expression.cc

    r5c4a473 rd65f92c  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Aug 13 11:31:00 2019
    13 // Update Count     : 63
     12// Last Modified On : Wed Aug  7 17:03:00 2019
     13// Update Count     : 62
    1414//
    1515
     
    6464
    6565bool Expression::get_lvalue() const {
    66         assert( !result->get_lvalue() );
    67         return false;
     66        return result->get_lvalue();
    6867}
    6968
     
    139138}
    140139
    141 bool VariableExpr::get_lvalue() const {
    142         return result->get_lvalue();
    143 }
    144 
    145140VariableExpr * VariableExpr::functionPointer( FunctionDecl * func ) {
    146141        VariableExpr * funcExpr = new VariableExpr( func );
     
    274269CastExpr::~CastExpr() {
    275270        delete arg;
    276 }
    277 
    278 bool CastExpr::get_lvalue() const {
    279         return result->get_lvalue();
    280271}
    281272
     
    389380        // don't delete the member declaration, since it points somewhere else in the tree
    390381        delete aggregate;
    391 }
    392 
    393 bool MemberExpr::get_lvalue() const {
    394         assert( result->get_lvalue() );
    395         return true;
    396382}
    397383
     
    446432}
    447433
    448 bool UntypedExpr::get_lvalue() const {
    449         return result->get_lvalue();
    450 }
    451434
    452435void UntypedExpr::print( std::ostream & os, Indenter indent ) const {
     
    507490        delete arg2;
    508491        delete arg3;
    509 }
    510 
    511 bool ConditionalExpr::get_lvalue() const {
    512         return result->get_lvalue();
    513492}
    514493
     
    569548}
    570549
    571 bool ConstructorExpr::get_lvalue() const {
    572         return result->get_lvalue();
    573 }
    574 
    575550void ConstructorExpr::print( std::ostream & os, Indenter indent ) const {
    576551        os <<  "Constructor Expression: " << std::endl << indent+1;
     
    590565CompoundLiteralExpr::~CompoundLiteralExpr() {
    591566        delete initializer;
    592 }
    593 
    594 bool CompoundLiteralExpr::get_lvalue() const {
    595         assert( result->get_lvalue() );
    596         return true;
    597567}
    598568
  • src/SynTree/Expression.h

    r5c4a473 rd65f92c  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug 14 14:24:00 2019
    13 // Update Count     : 53
     12// Last Modified On : Wed Aug  7 16:56:00 2019
     13// Update Count     : 51
    1414//
    1515
     
    7171        const Type * get_result() const { return result; }
    7272        void set_result( Type * newValue ) { result = newValue; }
    73         virtual bool get_lvalue() const;
     73        bool get_lvalue() const;
    7474
    7575        TypeSubstitution * get_env() const { return env; }
     
    9999        virtual ~ApplicationExpr();
    100100
    101         bool get_lvalue() const final;
    102 
    103101        Expression * get_function() const { return function; }
    104102        void set_function( Expression * newValue ) { function = newValue; }
     
    123121        UntypedExpr( const UntypedExpr & other );
    124122        virtual ~UntypedExpr();
    125 
    126         bool get_lvalue() const final;
    127123
    128124        Expression * get_function() const { return function; }
     
    213209        virtual ~CastExpr();
    214210
    215         bool get_lvalue() const final;
    216 
    217211        Expression * get_arg() const { return arg; }
    218212        void set_arg( Expression * newValue ) { arg = newValue; }
     
    298292        virtual ~MemberExpr();
    299293
    300         bool get_lvalue() const final;
    301 
    302294        DeclarationWithType * get_member() const { return member; }
    303295        void set_member( DeclarationWithType * newValue ) { member = newValue; }
     
    322314        VariableExpr( const VariableExpr & other );
    323315        virtual ~VariableExpr();
    324 
    325         bool get_lvalue() const final;
    326316
    327317        DeclarationWithType * get_var() const { return var; }
     
    511501        virtual ~ConditionalExpr();
    512502
    513         bool get_lvalue() const final;
    514 
    515503        Expression * get_arg1() const { return arg1; }
    516504        void set_arg1( Expression * newValue ) { arg1 = newValue; }
     
    537525        virtual ~CommaExpr();
    538526
    539         bool get_lvalue() const final;
    540 
    541527        Expression * get_arg1() const { return arg1; }
    542528        void set_arg1( Expression * newValue ) { arg1 = newValue; }
     
    625611        ~ConstructorExpr();
    626612
    627         bool get_lvalue() const final;
    628 
    629613        Expression * get_callExpr() const { return callExpr; }
    630614        void set_callExpr( Expression * newValue ) { callExpr = newValue; }
     
    645629        CompoundLiteralExpr( const CompoundLiteralExpr & other );
    646630        virtual ~CompoundLiteralExpr();
    647 
    648         bool get_lvalue() const final;
    649631
    650632        Initializer * get_initializer() const { return initializer; }
     
    705687        virtual ~TupleExpr();
    706688
    707         bool get_lvalue() const final;
    708 
    709689        std::list<Expression*>& get_exprs() { return exprs; }
    710690
     
    725705        TupleIndexExpr( const TupleIndexExpr & other );
    726706        virtual ~TupleIndexExpr();
    727 
    728         bool get_lvalue() const final;
    729707
    730708        Expression * get_tuple() const { return tuple; }
  • src/SynTree/TupleExpr.cc

    r5c4a473 rd65f92c  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug 14 14:34:00 2019
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Mar 17 09:42:29 2017
     13// Update Count     : 3
    1414//
    1515
     
    5757}
    5858
    59 bool TupleExpr::get_lvalue() const {
    60         return result->get_lvalue();
    61 }
    62 
    6359void TupleExpr::print( std::ostream &os, Indenter indent ) const {
    6460        os << "Tuple:" << std::endl;
     
    8076TupleIndexExpr::~TupleIndexExpr() {
    8177        delete tuple;
    82 }
    83 
    84 bool TupleIndexExpr::get_lvalue() const {
    85         assert( result->get_lvalue() );
    86         return true;
    8778}
    8879
  • src/main.cc

    r5c4a473 rd65f92c  
    1717#include <execinfo.h>                       // for backtrace, backtrace_symbols
    1818#include <getopt.h>                         // for no_argument, optind, geto...
     19#include <signal.h>                         // for signal, SIGABRT, SIGSEGV
    1920#include <cassert>                          // for assertf
    2021#include <cstdio>                           // for fopen, FILE, fclose, stdin
    2122#include <cstdlib>                          // for exit, free, abort, EXIT_F...
    22 #include <csignal>                         // for signal, SIGABRT, SIGSEGV
    2323#include <cstring>                          // for index
    2424#include <fstream>                          // for ofstream
     
    9696DeclarationNode * parseTree = nullptr;                                  // program parse tree
    9797
    98 static bool waiting_for_gdb = false; // flag to set cfa-cpp to wait for gdb on start
    99 
    10098static std::string PreludeDirector = "";
    10199
     
    169167} // sigAbortHandler
    170168
     169
    171170int main( int argc, char * argv[] ) {
    172171        FILE * input;                                                                           // use FILE rather than istream because yyin is FILE
     
    186185        parse_cmdline( argc, argv, filename );                          // process command-line arguments
    187186        CodeGen::FixMain::setReplaceMain( !nomainp );
    188 
    189         if(waiting_for_gdb) {
    190                 std::cerr << "Waiting for gdb" << std::endl;
    191                 std::cerr << "run :" << std::endl;
    192                 std::cerr << "  gdb attach " << getpid() << std::endl;
    193                 raise(SIGSTOP);
    194         }
    195187
    196188        try {
     
    206198                } else {                                                                                // no input file name
    207199                        input = stdin;
    208                         std::cerr << "Input from stdin" << std::endl;
    209200                        // if running cfa-cpp directly, might forget to pass -F option. Since this takes from stdin, pass
    210201                        // a fake name along
     
    447438
    448439
    449 static const char optstring[] = ":hlLmNnpP:S:tgwW:D:F:";
     440static const char optstring[] = ":hlLmNnpP:S:twW:D:F:";
    450441
    451442enum { PreludeDir = 128 };
     
    462453        { "statistics", required_argument, nullptr, 'S' },
    463454        { "tree", no_argument, nullptr, 't' },
    464         { "gdb", no_argument, nullptr, 'g' },
    465455        { "", no_argument, nullptr, 0 },                                        // -w
    466456        { "", no_argument, nullptr, 0 },                                        // -W
     
    481471        "<directory> prelude directory for debug/nodebug",      // no flag
    482472        "<option-list> enable profiling information:\n          counters,heap,time,all,none", // -S
    483         "building cfa standard lib",                                                                    // -t
    484         "wait for gdb to attach",                                                                       // -g
     473        "build in tree",                                                                        // -t
    485474        "",                                                                                                     // -w
    486475        "",                                                                                                     // -W
     
    593582                        Stats::parse_params( optarg );
    594583                        break;
    595                   case 't':                                                                             // building cfa stdlib
     584                  case 't':                                                                             // build in tree
    596585                        treep = true;
    597                         break;
    598                   case 'g':                                                                             // wait for gdb
    599                         waiting_for_gdb = true;
    600586                        break;
    601587                  case 'w':                                                                             // suppress all warnings, hidden
  • tests/Makefile.am

    r5c4a473 rd65f92c  
    2222debug=yes
    2323installed=no
    24 archiveerrors=
    2524
    2625INSTALL_FLAGS=-in-tree
     
    5958#----------------------------------------------------------------------------------------------------------------
    6059all-local :
    61         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     60        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}
    6261
    6362all-tests :
    64         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     63        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6564
    6665clean-local :
  • tests/Makefile.in

    r5c4a473 rd65f92c  
    378378debug = yes
    379379installed = no
    380 archiveerrors =
    381380INSTALL_FLAGS = -in-tree
    382381DEBUG_FLAGS = -debug -O0
     
    778777#----------------------------------------------------------------------------------------------------------------
    779778all-local :
    780         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     779        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}
    781780
    782781all-tests :
    783         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     782        @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    784783
    785784clean-local :
  • tests/pybin/settings.py

    r5c4a473 rd65f92c  
    44from . import tools
    55
    6 global original_path
    7 
    86try :
    9         original_path = os.getcwd()
    107        testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0])))
    118        sys.path.append(testpath)
     
    121118        global timeout
    122119        global output_width
    123 <<<<<<< HEAD
    124120        global distcc
    125 =======
    126         global archive
    127 >>>>>>> master
    128121
    129122        dry_run      = options.dry_run
     
    135128        timeout      = Timeouts(options.timeout, options.global_timeout)
    136129        output_width = 24
    137 <<<<<<< HEAD
    138130        distcc       = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()
    139 =======
    140         archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
    141 >>>>>>> master
    142131
    143132        if distribute and not os.environ.get('DISTCC_LOG'):
  • tests/pybin/tools.py

    r5c4a473 rd65f92c  
    22import argparse
    33import contextlib
    4 import datetime
    54import fileinput
    65import multiprocessing
     
    290289        return out.strip()
    291290
    292 # get pretty string for time of day
    293 def pretty_now():
    294         ts = time.time()
    295         print(ts, file=sys.stderr)
    296         return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H:%M:%S')
    297 
    298291# check if arguments is yes or no
    299292def yes_no(string):
     
    327320        return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output_file=subprocess.PIPE)
    328321
    329 def core_archive(dst, name, exe):
    330         # Get the files to copy
    331         core = os.path.join(os.getcwd(), "core" )
    332 
    333         # Uncomment if we want timestamps on coredumps
    334         # dst  = os.path.join(dst, "%s_%s" % (name, pretty_now()))
    335 
    336         # make a directory for this test
    337         mkdir(os.path.join(dst, "dir"))
    338 
    339         # moves the files
    340         mv( core, os.path.join(dst, "core" ) )
    341         mv( exe , os.path.join(dst, name   ) )
    342 
    343         # return explanatory test
    344         return "Archiving %s (executable and core) to %s" % (os.path.relpath(exe, settings.BUILDDIR), os.path.relpath(dst, settings.original_path))
    345 
    346322class Timed:
    347323    def __enter__(self):
  • tests/test.py

    r5c4a473 rd65f92c  
    9191        parser.add_argument('--all', help='Run all test available', action='store_true')
    9292        parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true')
    93         parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='')
    9493        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int)
    9594        parser.add_argument('--list-comp', help='List all valide arguments', action='store_true')
     
    180179                        error = error + info if error else info
    181180
    182                         if settings.archive:
    183                                 error = error + '\n' + core_archive(settings.archive, test.target(), exe_file)
    184 
    185181
    186182
     
    299295        # users may want to simply list the tests
    300296        if options.list_comp :
    301                 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout -j --jobs ", end='')
     297                print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='')
    302298                print(" ".join(map(lambda t: "%s" % (t.target()), tests)))
    303299
Note: See TracChangeset for help on using the changeset viewer.