Changeset 356c62a for src


Ignore:
Timestamp:
Feb 24, 2017, 4:01:59 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
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:
31868da
Parents:
131dbb3 (diff), 23c4aa8 (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:software/cfa/cfa-cc

Location:
src
Files:
6 added
1 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r131dbb3 r356c62a  
    332332                        if ( ObjectDecl * field = dynamic_cast< ObjectDecl * >( member ) ) {
    333333                                if ( isManaged( field ) ) {
    334                                         managedTypes.insert( SymTab::Mangler::mangle( aggregateDecl ) );
     334                                        StructInstType inst( Type::Qualifiers(), aggregateDecl );
     335                                        managedTypes.insert( SymTab::Mangler::mangle( &inst ) );
    335336                                        break;
    336337                                }
  • src/Parser/DeclarationNode.cc

    r131dbb3 r356c62a  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 13:06:50 2017
    13 // Update Count     : 753
     12// Last Modified On : Thu Feb 23 15:45:02 2017
     13// Update Count     : 759
    1414//
    1515
     
    174174        } // if
    175175
    176         if ( body ) {
    177                 newnode->type->function.hasBody = true;
    178         } // if
    179 
    180176        if ( ret ) {
    181177                newnode->type->base = ret->type;
     
    259255} // DeclarationNode::newAggregate
    260256
    261 DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants ) {
     257DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants, bool body ) {
    262258        DeclarationNode * newnode = new DeclarationNode;
    263259        newnode->type = new TypeData( TypeData::Enum );
     
    268264        } // if
    269265        newnode->type->enumeration.constants = constants;
     266        newnode->type->enumeration.body = body;
    270267        return newnode;
    271268} // DeclarationNode::newEnum
     
    698695        assert( ! type->function.body );
    699696        type->function.body = body;
    700         type->function.hasBody = true;
    701697        return this;
    702698}
     
    10401036        switch ( type->kind ) {
    10411037          case TypeData::Enum: {
    1042                   EnumDecl * typedecl = buildEnum( type, attributes );
    1043                   return new EnumInstType( buildQualifiers( type ), typedecl );
     1038                  if ( type->enumeration.body ) {
     1039                          EnumDecl * typedecl = buildEnum( type, attributes );
     1040                          return new EnumInstType( buildQualifiers( type ), typedecl );
     1041                  } else {
     1042                          return new EnumInstType( buildQualifiers( type ), *type->enumeration.name );
     1043                  }
    10441044          }
    10451045          case TypeData::Aggregate: {
    1046                   AggregateDecl * typedecl = buildAggregate( type, attributes );
    10471046                  ReferenceToType * ret;
    1048                   switch ( type->aggregate.kind ) {
    1049                         case DeclarationNode::Struct:
    1050                           ret = new StructInstType( buildQualifiers( type ), (StructDecl *)typedecl );
    1051                           break;
    1052                         case DeclarationNode::Union:
    1053                           ret = new UnionInstType( buildQualifiers( type ), (UnionDecl *)typedecl );
    1054                           break;
    1055                         case DeclarationNode::Trait:
    1056                           assert( false );
    1057                           //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
    1058                           break;
    1059                         default:
    1060                           assert( false );
    1061                   } // switch
     1047                  if ( type->aggregate.body ) {
     1048                          AggregateDecl * typedecl = buildAggregate( type, attributes );
     1049                          switch ( type->aggregate.kind ) {
     1050                                case DeclarationNode::Struct:
     1051                                  ret = new StructInstType( buildQualifiers( type ), (StructDecl *)typedecl );
     1052                                  break;
     1053                                case DeclarationNode::Union:
     1054                                  ret = new UnionInstType( buildQualifiers( type ), (UnionDecl *)typedecl );
     1055                                  break;
     1056                                case DeclarationNode::Trait:
     1057                                  assert( false );
     1058                                  //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
     1059                                  break;
     1060                                default:
     1061                                  assert( false );
     1062                          } // switch
     1063                  } else {
     1064                          switch ( type->aggregate.kind ) {
     1065                                case DeclarationNode::Struct:
     1066                                  ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
     1067                                  break;
     1068                                case DeclarationNode::Union:
     1069                                  ret = new UnionInstType( buildQualifiers( type ), *type->aggregate.name );
     1070                                  break;
     1071                                case DeclarationNode::Trait:
     1072                                  assert( false );
     1073                                  //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
     1074                                  break;
     1075                                default:
     1076                                  assert( false );
     1077                          } // switch
     1078                  } // if
    10621079                  buildList( type->aggregate.actuals, ret->get_parameters() );
    10631080                  return ret;
  • src/Parser/ParseNode.h

    r131dbb3 r356c62a  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 13:15:55 2017
    13 // Update Count     : 661
     12// Last Modified On : Thu Feb 23 15:22:10 2017
     13// Update Count     : 662
    1414//
    1515
     
    238238        static DeclarationNode * newFromTypedef( std::string * );
    239239        static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
    240         static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants );
     240        static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants, bool body );
    241241        static DeclarationNode * newEnumConstant( std::string * name, ExpressionNode * constant );
    242242        static DeclarationNode * newName( std::string * );
  • src/Parser/TypeData.cc

    r131dbb3 r356c62a  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Feb 19 09:49:33 2017
    13 // Update Count     : 467
     12// Last Modified On : Thu Feb 23 16:26:39 2017
     13// Update Count     : 477
    1414//
    1515
     
    4848                function.oldDeclList = nullptr;
    4949                function.body = nullptr;
    50                 function.hasBody = false;
    5150                function.newStyle = false;
    5251                break;
     
    6867                enumeration.name = nullptr;
    6968                enumeration.constants = nullptr;
     69                enumeration.body = false;
    7070                break;
    7171          case Symbolic:
     
    182182                newtype->function.oldDeclList = maybeClone( function.oldDeclList );
    183183                newtype->function.body = maybeClone( function.body );
    184                 newtype->function.hasBody = function.hasBody;
    185184                newtype->function.newStyle = function.newStyle;
    186185                break;
     
    200199                newtype->enumeration.name = enumeration.name ? new string( *enumeration.name ) : nullptr;
    201200                newtype->enumeration.constants = maybeClone( enumeration.constants );
     201                newtype->enumeration.body = enumeration.body;
    202202                break;
    203203          case Symbolic:
     
    293293                } // if
    294294                os << endl;
    295                 if ( function.hasBody ) {
     295                if ( function.body ) {
    296296                        os << string( indent + 2, ' ' ) << "with body " << endl;
    297                 } // if
    298                 if ( function.body ) {
    299297                        function.body->printList( os, indent + 2 );
    300298                } // if
     
    335333                        os << "with constants" << endl;
    336334                        enumeration.constants->printList( os, indent + 2 );
     335                } // if
     336                if ( enumeration.body ) {
     337                        os << string( indent + 2, ' ' ) << " with body " << endl;
    337338                } // if
    338339                break;
     
    696697                } // if
    697698        } // for
     699        ret->set_body( td->enumeration.body );
    698700        return ret;
    699701} // buildEnum
     
    724726Declaration * 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 ) {
    725727        if ( td->kind == TypeData::Function ) {
    726                 if ( td->function.idList ) {
    727                         buildKRFunction( td->function );
     728                if ( td->function.idList ) {                                    // KR function ?
     729                        buildKRFunction( td->function );                        // transform into C11 function
    728730                } // if
    729731
    730732                FunctionDecl * decl;
    731                 if ( td->function.hasBody ) {
    732                         if ( td->function.body ) {
    733                                 Statement * stmt = td->function.body->build();
    734                                 CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
    735                                 assert( body );
    736                                 decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn, attributes );
    737                         } else {
    738                                 // list< Label > ls;
    739                                 decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), new CompoundStmt( list< Label >() ), isInline, isNoreturn, attributes );
    740                         } // if
    741                 } else {
    742                         decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), nullptr, isInline, isNoreturn, attributes );
    743                 } // if
     733                Statement * stmt = maybeBuild<Statement>( td->function.body );
     734                CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
     735                decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn, attributes );
    744736                return decl->set_asmName( asmName );
    745737        } else if ( td->kind == TypeData::Aggregate ) {
     
    816808
    817809        for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode* >( param->get_next() ) ) {
    818                 if ( ! param->type ) {                                                  // generate type int for empty parameters
     810                if ( ! param->type ) {                                                  // generate type int for empty parameter type
    819811                        param->type = new TypeData( TypeData::Basic );
    820812                        param->type->basictype = DeclarationNode::Int;
  • src/Parser/TypeData.h

    r131dbb3 r356c62a  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 14:30:05 2017
    13 // Update Count     : 153
     12// Last Modified On : Thu Feb 23 15:16:18 2017
     13// Update Count     : 155
    1414//
    1515
     
    4949                const std::string * name;
    5050                DeclarationNode * constants;
     51                bool body;
    5152        };
    5253
     
    5657                mutable DeclarationNode * oldDeclList;
    5758                StatementNode * body;
    58                 bool hasBody;
    5959                bool newStyle;
    6060        };
  • src/Parser/parser.cc

    r131dbb3 r356c62a  
    72927292/* Line 1806 of yacc.c  */
    72937293#line 1651 "parser.yy"
    7294     { (yyval.decl) = DeclarationNode::newEnum( nullptr, (yyvsp[(4) - (6)].decl) )->addQualifiers( (yyvsp[(2) - (6)].decl) ); }
     7294    { (yyval.decl) = DeclarationNode::newEnum( nullptr, (yyvsp[(4) - (6)].decl), true )->addQualifiers( (yyvsp[(2) - (6)].decl) ); }
    72957295    break;
    72967296
     
    73017301    {
    73027302                        typedefTable.makeTypedef( *(yyvsp[(3) - (3)].tok) );
    7303                         (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (3)].tok), 0 )->addQualifiers( (yyvsp[(2) - (3)].decl) );
     7303                        (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (3)].tok), 0, false )->addQualifiers( (yyvsp[(2) - (3)].decl) );
    73047304                }
    73057305    break;
     
    73167316/* Line 1806 of yacc.c  */
    73177317#line 1660 "parser.yy"
    7318     { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (8)].tok), (yyvsp[(6) - (8)].decl) )->addQualifiers( (yyvsp[(2) - (8)].decl) ); }
     7318    { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (8)].tok), (yyvsp[(6) - (8)].decl), true )->addQualifiers( (yyvsp[(2) - (8)].decl) ); }
    73197319    break;
    73207320
  • src/Parser/parser.yy

    r131dbb3 r356c62a  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 16 15:56:33 2017
    13 // Update Count     : 2186
     12// Last Modified On : Thu Feb 23 15:23:49 2017
     13// Update Count     : 2187
    1414//
    1515
     
    16491649enum_type:
    16501650        ENUM attribute_list_opt '{' enumerator_list comma_opt '}'
    1651                 { $$ = DeclarationNode::newEnum( nullptr, $4 )->addQualifiers( $2 ); }
     1651                { $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); }
    16521652        | ENUM attribute_list_opt no_attr_identifier_or_type_name
    16531653                {
    16541654                        typedefTable.makeTypedef( *$3 );
    1655                         $$ = DeclarationNode::newEnum( $3, 0 )->addQualifiers( $2 );
     1655                        $$ = DeclarationNode::newEnum( $3, 0, false )->addQualifiers( $2 );
    16561656                }
    16571657        | ENUM attribute_list_opt no_attr_identifier_or_type_name
    16581658                { typedefTable.makeTypedef( *$3 ); }
    16591659          '{' enumerator_list comma_opt '}'
    1660                 { $$ = DeclarationNode::newEnum( $3, $6 )->addQualifiers( $2 ); }
     1660                { $$ = DeclarationNode::newEnum( $3, $6, true )->addQualifiers( $2 ); }
    16611661        ;
    16621662
  • src/benchmark/Makefile.am

    r131dbb3 r356c62a  
    2424bench :
    2525        @for ccflags in "-debug" "-nodebug"; do \
    26                 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
     26                echo ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -lrt bench.c;\
    2727                ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
    2828                ./a.out ; \
     
    3131
    3232ctxswitch-coroutine:
    33         ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 CorCtxSwitch.c
     33        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 CorCtxSwitch.c
    3434        @for number in 1 2 3 4 5 6 7 8 9 10; do \
    3535                ./a.out ; \
     
    3838
    3939ctxswitch-thread:
    40         ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
     40        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
    4141        @for number in 1 2 3 4 5 6 7 8 9 10; do \
    4242                ./a.out ; \
     
    4545
    4646csv-data:
    47         @${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -quiet -DN=10000000 csv-data.c
     47        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=10000000 csv-data.c
    4848        @./a.out
    4949        @rm -f ./a.out
  • src/benchmark/Makefile.in

    r131dbb3 r356c62a  
    471471bench :
    472472        @for ccflags in "-debug" "-nodebug"; do \
    473                 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
     473                echo ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -lrt bench.c;\
    474474                ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
    475475                ./a.out ; \
     
    478478
    479479ctxswitch-coroutine:
    480         ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 CorCtxSwitch.c
     480        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 CorCtxSwitch.c
    481481        @for number in 1 2 3 4 5 6 7 8 9 10; do \
    482482                ./a.out ; \
     
    485485
    486486ctxswitch-thread:
    487         ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
     487        ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
    488488        @for number in 1 2 3 4 5 6 7 8 9 10; do \
    489489                ./a.out ; \
     
    492492
    493493csv-data:
    494         @${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -quiet -DN=10000000 csv-data.c
     494        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=10000000 csv-data.c
    495495        @./a.out
    496496        @rm -f ./a.out
  • src/benchmark/csv-data.c

    r131dbb3 r356c62a  
    33#include <threads>
    44
     5extern "C" {
    56#include <unistd.h>                                     // sysconf
    67#include <sys/times.h>                                  // times
    78#include <time.h>
     9}
    810
    911inline unsigned long long int Time() {
     
    8486int main()
    8587{
    86         sout | time(NULL) | "," | measure_coroutine() | "," | measure_thread() | endl;
     88        sout | time(NULL) | ',' | measure_coroutine() | ',' | measure_thread() | endl;
    8789}
  • src/examples/multicore.c

    r131dbb3 r356c62a  
    1919                processor p;
    2020                {
    21                         scoped(MyThread) f1;
    22                         scoped(MyThread) f2;
    23                         scoped(MyThread) f3;
    24                         scoped(MyThread) f4;
     21                        scoped(MyThread) f[4];
    2522                }
    2623        }
  • src/libcfa/Makefile.am

    r131dbb3 r356c62a  
    4444# not all platforms support concurrency, add option do disable it
    4545if BUILD_CONCURRENCY
    46 headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel
     46headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel concurrency/monitor
    4747endif
    4848
  • src/libcfa/Makefile.in

    r131dbb3 r356c62a  
    4343
    4444# not all platforms support concurrency, add option do disable it
    45 @BUILD_CONCURRENCY_TRUE@am__append_3 = containers/vector concurrency/coroutines concurrency/threads concurrency/kernel
     45@BUILD_CONCURRENCY_TRUE@am__append_3 = containers/vector concurrency/coroutines concurrency/threads concurrency/kernel concurrency/monitor
    4646
    4747# not all platforms support concurrency, add option do disable it
     
    101101        containers/vector.c concurrency/coroutines.c \
    102102        concurrency/threads.c concurrency/kernel.c \
    103         concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     103        concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
     104        concurrency/invoke.c
    104105am__dirstamp = $(am__leading_dot)dirstamp
    105106@BUILD_CONCURRENCY_TRUE@am__objects_1 = containers/libcfa_d_a-vector.$(OBJEXT) \
    106107@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-coroutines.$(OBJEXT) \
    107108@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-threads.$(OBJEXT) \
    108 @BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-kernel.$(OBJEXT)
     109@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-kernel.$(OBJEXT) \
     110@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-monitor.$(OBJEXT)
    109111am__objects_2 = libcfa_d_a-limits.$(OBJEXT) \
    110112        libcfa_d_a-stdlib.$(OBJEXT) libcfa_d_a-math.$(OBJEXT) \
     
    124126        containers/vector.c concurrency/coroutines.c \
    125127        concurrency/threads.c concurrency/kernel.c \
    126         concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     128        concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
     129        concurrency/invoke.c
    127130@BUILD_CONCURRENCY_TRUE@am__objects_5 =  \
    128131@BUILD_CONCURRENCY_TRUE@        containers/libcfa_a-vector.$(OBJEXT) \
    129132@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-coroutines.$(OBJEXT) \
    130133@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-threads.$(OBJEXT) \
    131 @BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-kernel.$(OBJEXT)
     134@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-kernel.$(OBJEXT) \
     135@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-monitor.$(OBJEXT)
    132136am__objects_6 = libcfa_a-limits.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \
    133137        libcfa_a-math.$(OBJEXT) libcfa_a-iostream.$(OBJEXT) \
     
    172176        fstream iterator rational assert containers/vector \
    173177        concurrency/coroutines concurrency/threads concurrency/kernel \
    174         ${shell echo stdhdr/*} concurrency/invoke.h
     178        concurrency/monitor ${shell echo stdhdr/*} \
     179        concurrency/invoke.h
    175180HEADERS = $(nobase_cfa_include_HEADERS)
    176181ETAGS = etags
     
    398403concurrency/libcfa_d_a-kernel.$(OBJEXT): concurrency/$(am__dirstamp) \
    399404        concurrency/$(DEPDIR)/$(am__dirstamp)
     405concurrency/libcfa_d_a-monitor.$(OBJEXT): concurrency/$(am__dirstamp) \
     406        concurrency/$(DEPDIR)/$(am__dirstamp)
    400407concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT):  \
    401408        concurrency/$(am__dirstamp) \
     
    416423concurrency/libcfa_a-kernel.$(OBJEXT): concurrency/$(am__dirstamp) \
    417424        concurrency/$(DEPDIR)/$(am__dirstamp)
     425concurrency/libcfa_a-monitor.$(OBJEXT): concurrency/$(am__dirstamp) \
     426        concurrency/$(DEPDIR)/$(am__dirstamp)
    418427concurrency/libcfa_a-invoke.$(OBJEXT): concurrency/$(am__dirstamp) \
    419428        concurrency/$(DEPDIR)/$(am__dirstamp)
     
    429438        -rm -f concurrency/libcfa_a-invoke.$(OBJEXT)
    430439        -rm -f concurrency/libcfa_a-kernel.$(OBJEXT)
     440        -rm -f concurrency/libcfa_a-monitor.$(OBJEXT)
    431441        -rm -f concurrency/libcfa_a-threads.$(OBJEXT)
    432442        -rm -f concurrency/libcfa_d_a-coroutines.$(OBJEXT)
    433443        -rm -f concurrency/libcfa_d_a-invoke.$(OBJEXT)
    434444        -rm -f concurrency/libcfa_d_a-kernel.$(OBJEXT)
     445        -rm -f concurrency/libcfa_d_a-monitor.$(OBJEXT)
    435446        -rm -f concurrency/libcfa_d_a-threads.$(OBJEXT)
    436447        -rm -f containers/libcfa_a-vector.$(OBJEXT)
     
    462473@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-invoke.Po@am__quote@
    463474@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-kernel.Po@am__quote@
     475@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-monitor.Po@am__quote@
    464476@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-threads.Po@am__quote@
    465477@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-coroutines.Po@am__quote@
    466478@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-invoke.Po@am__quote@
    467479@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-kernel.Po@am__quote@
     480@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po@am__quote@
    468481@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-threads.Po@am__quote@
    469482@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-vector.Po@am__quote@
     
    677690@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
    678691
     692concurrency/libcfa_d_a-monitor.o: concurrency/monitor.c
     693@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     694@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
     695@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.o' libtool=no @AMDEPBACKSLASH@
     696@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     697@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     698
     699concurrency/libcfa_d_a-monitor.obj: concurrency/monitor.c
     700@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     701@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
     702@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
     703@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     704@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     705
    679706concurrency/libcfa_d_a-invoke.obj: concurrency/invoke.c
    680707@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-invoke.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-invoke.Tpo -c -o concurrency/libcfa_d_a-invoke.obj `if test -f 'concurrency/invoke.c'; then $(CYGPATH_W) 'concurrency/invoke.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/invoke.c'; fi`
     
    858885@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    859886@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
     887
     888concurrency/libcfa_a-monitor.o: concurrency/monitor.c
     889@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     890@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
     891@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.o' libtool=no @AMDEPBACKSLASH@
     892@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     893@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     894
     895concurrency/libcfa_a-monitor.obj: concurrency/monitor.c
     896@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     897@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
     898@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
     899@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     900@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
    860901
    861902concurrency/libcfa_a-invoke.obj: concurrency/invoke.c
  • src/libcfa/concurrency/kernel.c

    r131dbb3 r356c62a  
    456456
    457457void append( simple_thread_list * this, thread * t ) {
    458         assert( t->next == NULL );
     458        assert(this->tail != NULL);
    459459        *this->tail = t;
    460460        this->tail = &t->next;
     
    470470                head->next = NULL;
    471471        }       
    472        
    473472        return head;
    474473}
  • src/libcfa/concurrency/threads

    r131dbb3 r356c62a  
    99//
    1010// Author           : Thierry Delisle
    11 // Created On       : Tue Jan 17 12:27:26 2016
     11// Created On       : Tue Jan 17 12:27:26 2017
    1212// Last Modified By : Thierry Delisle
    1313// Last Modified On : --
  • src/libcfa/concurrency/threads.c

    r131dbb3 r356c62a  
    99//
    1010// Author           : Thierry Delisle
    11 // Created On       : Tue Jan 17 12:27:26 2016
     11// Created On       : Tue Jan 17 12:27:26 2017
    1212// Last Modified By : Thierry Delisle
    1313// Last Modified On : --
  • src/libcfa/stdlib

    r131dbb3 r356c62a  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul  6 14:28:55 2016
    13 // Update Count     : 99
     12// Last Modified On : Thu Feb 23 14:11:47 2017
     13// Update Count     : 100
    1414//
    1515
     
    5050forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p );
    5151forall( dtype T | { void ^?{}(T *); } ) void delete( T * ptr );
    52 
     52forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } ) void delete( T * ptr, Params rest );
    5353
    5454//---------------------------------------
  • src/libcfa/stdlib.c

    r131dbb3 r356c62a  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul  6 14:28:57 2016
    13 // Update Count     : 169
     12// Last Modified On : Thu Feb 23 14:11:29 2017
     13// Update Count     : 170
    1414//
    1515
     
    9191}
    9292
     93forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } )
     94void delete( T * ptr, Params rest ) {
     95        if ( ptr ) {
     96                ^ptr{};
     97                free( ptr );
     98        }
     99        delete( rest );
     100}
     101
    93102//---------------------------------------
    94103
  • src/tests/.expect/abs.txt

    r131dbb3 r356c62a  
    1 char                    ¿       abs A
     1char                    -65     abs 65
    22signed int              -65     abs 65
    33signed long int         -65     abs 65
  • src/tests/abs.c

    r131dbb3 r356c62a  
    1010// Created On       : Thu Jan 28 18:26:16 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 15:07:26 2016
    13 // Update Count     : 51
     12// Last Modified On : Wed Feb 22 22:31:03 2017
     13// Update Count     : 52
    1414//
    1515
     
    1818
    1919int main( void ) {
    20         char ch = -65;
     20        signed char ch = -65;
    2121        sout | "char\t\t\t"                                     | ch     | "\tabs " | abs( ch ) | endl;
    2222        sout | "signed int\t\t"                         | -65    | "\tabs" | abs( -65 ) | endl;
  • src/tests/simpleGenericTriple.c

    r131dbb3 r356c62a  
    2828  int x1 = 123, x3 = 456;
    2929  double x2 = 999.123;
    30   struct T3(int) Li = { x1, x2, x3 };
     30  struct T3(int) Li = { x1, (int)x2, x3 };
    3131  struct T3(int) Ri = { 9, 2, 3 };
    3232  struct T3(int) reti = Li+Ri;
Note: See TracChangeset for help on using the changeset viewer.