- Timestamp:
- Feb 24, 2017, 1:28:00 PM (9 years ago)
- 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:
- 23c4aa8
- Parents:
- c00ddfe (diff), 783dfd6 (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. - Location:
- src
- Files:
-
- 6 added
- 1 deleted
- 21 edited
-
CodeTools/DeclStats.cc (modified) (5 diffs)
-
Parser/DeclarationNode.cc (modified) (6 diffs)
-
Parser/ParseNode.h (modified) (2 diffs)
-
Parser/TypeData.cc (modified) (10 diffs)
-
Parser/TypeData.h (modified) (3 diffs)
-
Parser/core (deleted)
-
Parser/parser.cc (modified) (3 diffs)
-
Parser/parser.yy (modified) (2 diffs)
-
benchmark/Makefile.am (modified) (4 diffs)
-
benchmark/Makefile.in (modified) (4 diffs)
-
benchmark/csv-data.c (modified) (2 diffs)
-
examples/multicore.c (modified) (1 diff)
-
libcfa/Makefile.am (modified) (1 diff)
-
libcfa/Makefile.in (modified) (10 diffs)
-
libcfa/concurrency/kernel.c (modified) (2 diffs)
-
libcfa/concurrency/monitor (added)
-
libcfa/concurrency/monitor.c (added)
-
libcfa/concurrency/threads (modified) (1 diff)
-
libcfa/concurrency/threads.c (modified) (1 diff)
-
libcfa/stdlib (modified) (2 diffs)
-
libcfa/stdlib.c (modified) (2 diffs)
-
prelude/prelude.cf (modified) (4 diffs)
-
tests/.expect/abs.txt (modified) (1 diff)
-
tests/.expect/globals.txt (added)
-
tests/.expect/monitor.txt (added)
-
tests/abs.c (modified) (2 diffs)
-
tests/globals.c (added)
-
tests/monitor.c (added)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeTools/DeclStats.cc
rc00ddfe r255b294 62 62 std::map<unsigned, unsigned> p_basic; ///< Count of decls with each percentage of basic type elements 63 63 std::map<unsigned, unsigned> p_poly; ///< Count of decls with each percentage of polymorphic elements 64 VectorMap<unsigned> n_types; ///< Count of decls with each number of distinct types in the pack 64 65 65 66 ArgPackStats& operator+= (const ArgPackStats& o) { … … 69 70 sum(p_basic, o.p_basic); 70 71 sum(p_poly, o.p_poly); 72 sum(n_types, o.n_types); 71 73 72 74 return *this; … … 121 123 /// Update arg pack stats based on a declaration list 122 124 void analyze( Stats& stats, ArgPackStats& pstats, std::list<DeclarationWithType*>& decls ) { 125 std::unordered_set<std::string> types; 123 126 unsigned n = 0; 124 127 unsigned n_basic = 0; 125 128 unsigned n_poly = 0; 126 129 for ( auto decl : decls ) { 127 n += decl->get_type()->size(); 128 if ( BasicType* bt = dynamic_cast<BasicType*>( decl->get_type() ) ) { 130 Type* dt = decl->get_type(); 131 132 n += dt->size(); 133 134 std::stringstream ss; 135 dt->print( ss ); 136 types.insert( ss.str() ); 137 138 if ( dynamic_cast<BasicType*>( dt ) ) { 129 139 ++n_basic; 130 std::stringstream ss;131 bt->print( ss );132 140 ++stats.basic_type_names[ ss.str() ]; 133 } else if ( GenPoly::hasPolyBase( d ecl->get_type()) ) {141 } else if ( GenPoly::hasPolyBase( dt ) ) { 134 142 ++n_poly; 135 143 } else { 136 std::stringstream ss;137 decl->get_type()->print( ss );138 144 ++stats.compound_type_names[ ss.str() ]; 139 145 } … … 146 152 ++pstats.p_poly[ n_poly*100/n ]; 147 153 } 154 ++pstats.n_types.at( types.size() ); 148 155 } 149 156 … … 267 274 printAllMap("%_basic_" + name, [&extract](const Stats& stats) { return extract(stats).p_basic; }); 268 275 printAllMap("%_poly_" + name, [&extract](const Stats& stats) { return extract(stats).p_poly; }); 276 printAllMap("n_distinct_types_" + name, [&extract](const Stats& stats) { return extract(stats).n_types; }); 269 277 } 270 278 -
src/Parser/DeclarationNode.cc
rc00ddfe r255b294 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 16 13:06:50201713 // Update Count : 75 312 // Last Modified On : Thu Feb 23 15:45:02 2017 13 // Update Count : 759 14 14 // 15 15 … … 174 174 } // if 175 175 176 if ( body ) {177 newnode->type->function.hasBody = true;178 } // if179 180 176 if ( ret ) { 181 177 newnode->type->base = ret->type; … … 259 255 } // DeclarationNode::newAggregate 260 256 261 DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants ) {257 DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants, bool body ) { 262 258 DeclarationNode * newnode = new DeclarationNode; 263 259 newnode->type = new TypeData( TypeData::Enum ); … … 268 264 } // if 269 265 newnode->type->enumeration.constants = constants; 266 newnode->type->enumeration.body = body; 270 267 return newnode; 271 268 } // DeclarationNode::newEnum … … 698 695 assert( ! type->function.body ); 699 696 type->function.body = body; 700 type->function.hasBody = true;701 697 return this; 702 698 } … … 1040 1036 switch ( type->kind ) { 1041 1037 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 } 1044 1044 } 1045 1045 case TypeData::Aggregate: { 1046 AggregateDecl * typedecl = buildAggregate( type, attributes );1047 1046 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 1062 1079 buildList( type->aggregate.actuals, ret->get_parameters() ); 1063 1080 return ret; -
src/Parser/ParseNode.h
rc00ddfe r255b294 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 16 13:15:55201713 // Update Count : 66 112 // Last Modified On : Thu Feb 23 15:22:10 2017 13 // Update Count : 662 14 14 // 15 15 … … 238 238 static DeclarationNode * newFromTypedef( std::string * ); 239 239 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 ); 241 241 static DeclarationNode * newEnumConstant( std::string * name, ExpressionNode * constant ); 242 242 static DeclarationNode * newName( std::string * ); -
src/Parser/TypeData.cc
rc00ddfe r255b294 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Feb 19 09:49:33201713 // Update Count : 4 6712 // Last Modified On : Thu Feb 23 16:26:39 2017 13 // Update Count : 477 14 14 // 15 15 … … 48 48 function.oldDeclList = nullptr; 49 49 function.body = nullptr; 50 function.hasBody = false;51 50 function.newStyle = false; 52 51 break; … … 68 67 enumeration.name = nullptr; 69 68 enumeration.constants = nullptr; 69 enumeration.body = false; 70 70 break; 71 71 case Symbolic: … … 182 182 newtype->function.oldDeclList = maybeClone( function.oldDeclList ); 183 183 newtype->function.body = maybeClone( function.body ); 184 newtype->function.hasBody = function.hasBody;185 184 newtype->function.newStyle = function.newStyle; 186 185 break; … … 200 199 newtype->enumeration.name = enumeration.name ? new string( *enumeration.name ) : nullptr; 201 200 newtype->enumeration.constants = maybeClone( enumeration.constants ); 201 newtype->enumeration.body = enumeration.body; 202 202 break; 203 203 case Symbolic: … … 293 293 } // if 294 294 os << endl; 295 if ( function. hasBody ) {295 if ( function.body ) { 296 296 os << string( indent + 2, ' ' ) << "with body " << endl; 297 } // if298 if ( function.body ) {299 297 function.body->printList( os, indent + 2 ); 300 298 } // if … … 335 333 os << "with constants" << endl; 336 334 enumeration.constants->printList( os, indent + 2 ); 335 } // if 336 if ( enumeration.body ) { 337 os << string( indent + 2, ' ' ) << " with body " << endl; 337 338 } // if 338 339 break; … … 696 697 } // if 697 698 } // for 699 ret->set_body( td->enumeration.body ); 698 700 return ret; 699 701 } // buildEnum … … 724 726 Declaration * 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 ) { 725 727 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 728 730 } // if 729 731 730 732 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 ); 744 736 return decl->set_asmName( asmName ); 745 737 } else if ( td->kind == TypeData::Aggregate ) { … … 816 808 817 809 for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode* >( param->get_next() ) ) { 818 if ( ! param->type ) { // generate type int for empty parameter s810 if ( ! param->type ) { // generate type int for empty parameter type 819 811 param->type = new TypeData( TypeData::Basic ); 820 812 param->type->basictype = DeclarationNode::Int; -
src/Parser/TypeData.h
rc00ddfe r255b294 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 16 14:30:05201713 // Update Count : 15 312 // Last Modified On : Thu Feb 23 15:16:18 2017 13 // Update Count : 155 14 14 // 15 15 … … 49 49 const std::string * name; 50 50 DeclarationNode * constants; 51 bool body; 51 52 }; 52 53 … … 56 57 mutable DeclarationNode * oldDeclList; 57 58 StatementNode * body; 58 bool hasBody;59 59 bool newStyle; 60 60 }; -
src/Parser/parser.cc
rc00ddfe r255b294 7292 7292 /* Line 1806 of yacc.c */ 7293 7293 #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) ); } 7295 7295 break; 7296 7296 … … 7301 7301 { 7302 7302 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) ); 7304 7304 } 7305 7305 break; … … 7316 7316 /* Line 1806 of yacc.c */ 7317 7317 #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) ); } 7319 7319 break; 7320 7320 -
src/Parser/parser.yy
rc00ddfe r255b294 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 16 15:56:33201713 // Update Count : 218 612 // Last Modified On : Thu Feb 23 15:23:49 2017 13 // Update Count : 2187 14 14 // 15 15 … … 1649 1649 enum_type: 1650 1650 ENUM attribute_list_opt '{' enumerator_list comma_opt '}' 1651 { $$ = DeclarationNode::newEnum( nullptr, $4 )->addQualifiers( $2 ); }1651 { $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); } 1652 1652 | ENUM attribute_list_opt no_attr_identifier_or_type_name 1653 1653 { 1654 1654 typedefTable.makeTypedef( *$3 ); 1655 $$ = DeclarationNode::newEnum( $3, 0 )->addQualifiers( $2 );1655 $$ = DeclarationNode::newEnum( $3, 0, false )->addQualifiers( $2 ); 1656 1656 } 1657 1657 | ENUM attribute_list_opt no_attr_identifier_or_type_name 1658 1658 { typedefTable.makeTypedef( *$3 ); } 1659 1659 '{' enumerator_list comma_opt '}' 1660 { $$ = DeclarationNode::newEnum( $3, $6 )->addQualifiers( $2 ); }1660 { $$ = DeclarationNode::newEnum( $3, $6, true )->addQualifiers( $2 ); } 1661 1661 ; 1662 1662 -
src/benchmark/Makefile.am
rc00ddfe r255b294 24 24 bench : 25 25 @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;\ 27 27 ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\ 28 28 ./a.out ; \ … … 31 31 32 32 ctxswitch-coroutine: 33 ${CC} ${AM_CFLAGS} ${CFLAGS} $ ${ccflags}-nodebug -lrt -DN=10000000 CorCtxSwitch.c33 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 CorCtxSwitch.c 34 34 @for number in 1 2 3 4 5 6 7 8 9 10; do \ 35 35 ./a.out ; \ … … 38 38 39 39 ctxswitch-thread: 40 ${CC} ${AM_CFLAGS} ${CFLAGS} $ ${ccflags}-nodebug -lrt -DN=10000000 ThrdCtxSwitch.c40 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c 41 41 @for number in 1 2 3 4 5 6 7 8 9 10; do \ 42 42 ./a.out ; \ … … 45 45 46 46 csv-data: 47 @${CC} ${AM_CFLAGS} ${CFLAGS} $ ${ccflags}-nodebug -lrt -quiet -DN=10000000 csv-data.c47 @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=10000000 csv-data.c 48 48 @./a.out 49 49 @rm -f ./a.out -
src/benchmark/Makefile.in
rc00ddfe r255b294 471 471 bench : 472 472 @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;\ 474 474 ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\ 475 475 ./a.out ; \ … … 478 478 479 479 ctxswitch-coroutine: 480 ${CC} ${AM_CFLAGS} ${CFLAGS} $ ${ccflags}-nodebug -lrt -DN=10000000 CorCtxSwitch.c480 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 CorCtxSwitch.c 481 481 @for number in 1 2 3 4 5 6 7 8 9 10; do \ 482 482 ./a.out ; \ … … 485 485 486 486 ctxswitch-thread: 487 ${CC} ${AM_CFLAGS} ${CFLAGS} $ ${ccflags}-nodebug -lrt -DN=10000000 ThrdCtxSwitch.c487 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c 488 488 @for number in 1 2 3 4 5 6 7 8 9 10; do \ 489 489 ./a.out ; \ … … 492 492 493 493 csv-data: 494 @${CC} ${AM_CFLAGS} ${CFLAGS} $ ${ccflags}-nodebug -lrt -quiet -DN=10000000 csv-data.c494 @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=10000000 csv-data.c 495 495 @./a.out 496 496 @rm -f ./a.out -
src/benchmark/csv-data.c
rc00ddfe r255b294 3 3 #include <threads> 4 4 5 extern "C" { 5 6 #include <unistd.h> // sysconf 6 7 #include <sys/times.h> // times 7 8 #include <time.h> 9 } 8 10 9 11 inline unsigned long long int Time() { … … 84 86 int main() 85 87 { 86 sout | time(NULL) | "," | measure_coroutine() | ","| measure_thread() | endl;88 sout | time(NULL) | ',' | measure_coroutine() | ',' | measure_thread() | endl; 87 89 } -
src/examples/multicore.c
rc00ddfe r255b294 19 19 processor p; 20 20 { 21 scoped(MyThread) f1; 22 scoped(MyThread) f2; 23 scoped(MyThread) f3; 24 scoped(MyThread) f4; 21 scoped(MyThread) f[4]; 25 22 } 26 23 } -
src/libcfa/Makefile.am
rc00ddfe r255b294 44 44 # not all platforms support concurrency, add option do disable it 45 45 if BUILD_CONCURRENCY 46 headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel 46 headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel concurrency/monitor 47 47 endif 48 48 -
src/libcfa/Makefile.in
rc00ddfe r255b294 43 43 44 44 # 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 46 46 47 47 # not all platforms support concurrency, add option do disable it … … 101 101 containers/vector.c concurrency/coroutines.c \ 102 102 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 104 105 am__dirstamp = $(am__leading_dot)dirstamp 105 106 @BUILD_CONCURRENCY_TRUE@am__objects_1 = containers/libcfa_d_a-vector.$(OBJEXT) \ 106 107 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_d_a-coroutines.$(OBJEXT) \ 107 108 @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) 109 111 am__objects_2 = libcfa_d_a-limits.$(OBJEXT) \ 110 112 libcfa_d_a-stdlib.$(OBJEXT) libcfa_d_a-math.$(OBJEXT) \ … … 124 126 containers/vector.c concurrency/coroutines.c \ 125 127 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 127 130 @BUILD_CONCURRENCY_TRUE@am__objects_5 = \ 128 131 @BUILD_CONCURRENCY_TRUE@ containers/libcfa_a-vector.$(OBJEXT) \ 129 132 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_a-coroutines.$(OBJEXT) \ 130 133 @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) 132 136 am__objects_6 = libcfa_a-limits.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \ 133 137 libcfa_a-math.$(OBJEXT) libcfa_a-iostream.$(OBJEXT) \ … … 172 176 fstream iterator rational assert containers/vector \ 173 177 concurrency/coroutines concurrency/threads concurrency/kernel \ 174 ${shell echo stdhdr/*} concurrency/invoke.h 178 concurrency/monitor ${shell echo stdhdr/*} \ 179 concurrency/invoke.h 175 180 HEADERS = $(nobase_cfa_include_HEADERS) 176 181 ETAGS = etags … … 398 403 concurrency/libcfa_d_a-kernel.$(OBJEXT): concurrency/$(am__dirstamp) \ 399 404 concurrency/$(DEPDIR)/$(am__dirstamp) 405 concurrency/libcfa_d_a-monitor.$(OBJEXT): concurrency/$(am__dirstamp) \ 406 concurrency/$(DEPDIR)/$(am__dirstamp) 400 407 concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT): \ 401 408 concurrency/$(am__dirstamp) \ … … 416 423 concurrency/libcfa_a-kernel.$(OBJEXT): concurrency/$(am__dirstamp) \ 417 424 concurrency/$(DEPDIR)/$(am__dirstamp) 425 concurrency/libcfa_a-monitor.$(OBJEXT): concurrency/$(am__dirstamp) \ 426 concurrency/$(DEPDIR)/$(am__dirstamp) 418 427 concurrency/libcfa_a-invoke.$(OBJEXT): concurrency/$(am__dirstamp) \ 419 428 concurrency/$(DEPDIR)/$(am__dirstamp) … … 429 438 -rm -f concurrency/libcfa_a-invoke.$(OBJEXT) 430 439 -rm -f concurrency/libcfa_a-kernel.$(OBJEXT) 440 -rm -f concurrency/libcfa_a-monitor.$(OBJEXT) 431 441 -rm -f concurrency/libcfa_a-threads.$(OBJEXT) 432 442 -rm -f concurrency/libcfa_d_a-coroutines.$(OBJEXT) 433 443 -rm -f concurrency/libcfa_d_a-invoke.$(OBJEXT) 434 444 -rm -f concurrency/libcfa_d_a-kernel.$(OBJEXT) 445 -rm -f concurrency/libcfa_d_a-monitor.$(OBJEXT) 435 446 -rm -f concurrency/libcfa_d_a-threads.$(OBJEXT) 436 447 -rm -f containers/libcfa_a-vector.$(OBJEXT) … … 462 473 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-invoke.Po@am__quote@ 463 474 @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@ 464 476 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-threads.Po@am__quote@ 465 477 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-coroutines.Po@am__quote@ 466 478 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-invoke.Po@am__quote@ 467 479 @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@ 468 481 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-threads.Po@am__quote@ 469 482 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-vector.Po@am__quote@ … … 677 690 @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` 678 691 692 concurrency/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 699 concurrency/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 679 706 concurrency/libcfa_d_a-invoke.obj: concurrency/invoke.c 680 707 @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` … … 858 885 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 859 886 @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 888 concurrency/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 895 concurrency/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` 860 901 861 902 concurrency/libcfa_a-invoke.obj: concurrency/invoke.c -
src/libcfa/concurrency/kernel.c
rc00ddfe r255b294 456 456 457 457 void append( simple_thread_list * this, thread * t ) { 458 assert( t->next == NULL);458 assert(this->tail != NULL); 459 459 *this->tail = t; 460 460 this->tail = &t->next; … … 470 470 head->next = NULL; 471 471 } 472 473 472 return head; 474 473 } -
src/libcfa/concurrency/threads
rc00ddfe r255b294 9 9 // 10 10 // Author : Thierry Delisle 11 // Created On : Tue Jan 17 12:27:26 201 611 // Created On : Tue Jan 17 12:27:26 2017 12 12 // Last Modified By : Thierry Delisle 13 13 // Last Modified On : -- -
src/libcfa/concurrency/threads.c
rc00ddfe r255b294 9 9 // 10 10 // Author : Thierry Delisle 11 // Created On : Tue Jan 17 12:27:26 201 611 // Created On : Tue Jan 17 12:27:26 2017 12 12 // Last Modified By : Thierry Delisle 13 13 // Last Modified On : -- -
src/libcfa/stdlib
rc00ddfe r255b294 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 6 14:28:55 201613 // Update Count : 9912 // Last Modified On : Thu Feb 23 14:11:47 2017 13 // Update Count : 100 14 14 // 15 15 … … 50 50 forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p ); 51 51 forall( dtype T | { void ^?{}(T *); } ) void delete( T * ptr ); 52 52 forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } ) void delete( T * ptr, Params rest ); 53 53 54 54 //--------------------------------------- -
src/libcfa/stdlib.c
rc00ddfe r255b294 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 6 14:28:57 201613 // Update Count : 1 6912 // Last Modified On : Thu Feb 23 14:11:29 2017 13 // Update Count : 170 14 14 // 15 15 … … 91 91 } 92 92 93 forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } ) 94 void delete( T * ptr, Params rest ) { 95 if ( ptr ) { 96 ^ptr{}; 97 free( ptr ); 98 } 99 delete( rest ); 100 } 101 93 102 //--------------------------------------- 94 103 -
src/prelude/prelude.cf
rc00ddfe r255b294 58 58 long double _Complex ?--( long double _Complex * ), ?--( volatile long double _Complex * ); 59 59 60 forall( otype T) T * ?++( T ** );61 forall( otype T) const T * ?++( const T ** );62 forall( otype T) volatile T * ?++( volatile T ** );63 forall( otype T) const volatile T * ?++( const volatile T ** );64 forall( otype T) T * ?--( T ** );65 forall( otype T) const T * ?--( const T ** );66 forall( otype T) volatile T * ?--( volatile T ** );67 forall( otype T) const volatile T * ?--( const volatile T ** );68 69 forall( otype T) lvalue T ?[?]( T *, ptrdiff_t );70 forall( otype T) const lvalue T ?[?]( const T *, ptrdiff_t );71 forall( otype T) volatile lvalue T ?[?]( volatile T *, ptrdiff_t );72 forall( otype T) const volatile lvalue T ?[?]( const volatile T *, ptrdiff_t );73 forall( otype T) lvalue T ?[?]( ptrdiff_t, T * );74 forall( otype T) const lvalue T ?[?]( ptrdiff_t, const T * );75 forall( otype T) volatile lvalue T ?[?]( ptrdiff_t, volatile T * );76 forall( otype T) const volatile lvalue T ?[?]( ptrdiff_t, const volatile T * );60 forall( dtype T | sized(T) ) T * ?++( T ** ); 61 forall( dtype T | sized(T) ) const T * ?++( const T ** ); 62 forall( dtype T | sized(T) ) volatile T * ?++( volatile T ** ); 63 forall( dtype T | sized(T) ) const volatile T * ?++( const volatile T ** ); 64 forall( dtype T | sized(T) ) T * ?--( T ** ); 65 forall( dtype T | sized(T) ) const T * ?--( const T ** ); 66 forall( dtype T | sized(T) ) volatile T * ?--( volatile T ** ); 67 forall( dtype T | sized(T) ) const volatile T * ?--( const volatile T ** ); 68 69 forall( dtype T | sized(T) ) lvalue T ?[?]( T *, ptrdiff_t ); 70 forall( dtype T | sized(T) ) const lvalue T ?[?]( const T *, ptrdiff_t ); 71 forall( dtype T | sized(T) ) volatile lvalue T ?[?]( volatile T *, ptrdiff_t ); 72 forall( dtype T | sized(T) ) const volatile lvalue T ?[?]( const volatile T *, ptrdiff_t ); 73 forall( dtype T | sized(T) ) lvalue T ?[?]( ptrdiff_t, T * ); 74 forall( dtype T | sized(T) ) const lvalue T ?[?]( ptrdiff_t, const T * ); 75 forall( dtype T | sized(T) ) volatile lvalue T ?[?]( ptrdiff_t, volatile T * ); 76 forall( dtype T | sized(T) ) const volatile lvalue T ?[?]( ptrdiff_t, const volatile T * ); 77 77 78 78 // ------------------------------------------------------------ … … 96 96 long double _Complex ++?( long double _Complex * ), --?( long double _Complex * ); 97 97 98 forall( otype T) T * ++?( T ** );99 forall( otype T) const T * ++?( const T ** );100 forall( otype T) volatile T * ++?( volatile T ** );101 forall( otype T) const volatile T * ++?( const volatile T ** );102 forall( otype T) T * --?( T ** );103 forall( otype T) const T * --?( const T ** );104 forall( otype T) volatile T * --?( volatile T ** );105 forall( otype T) const volatile T * --?( const volatile T ** );98 forall( dtype T | sized(T) ) T * ++?( T ** ); 99 forall( dtype T | sized(T) ) const T * ++?( const T ** ); 100 forall( dtype T | sized(T) ) volatile T * ++?( volatile T ** ); 101 forall( dtype T | sized(T) ) const volatile T * ++?( const volatile T ** ); 102 forall( dtype T | sized(T) ) T * --?( T ** ); 103 forall( dtype T | sized(T) ) const T * --?( const T ** ); 104 forall( dtype T | sized(T) ) volatile T * --?( volatile T ** ); 105 forall( dtype T | sized(T) ) const volatile T * --?( const volatile T ** ); 106 106 107 107 forall( dtype T | sized(T) ) lvalue T *?( T * ); … … 178 178 long double _Complex ?+?( long double _Complex, long double _Complex ), ?-?( long double _Complex, long double _Complex ); 179 179 180 forall( otype T) T * ?+?( T *, ptrdiff_t );181 forall( otype T) T * ?+?( ptrdiff_t, T * );182 forall( otype T) const T * ?+?( const T *, ptrdiff_t );183 forall( otype T) const T * ?+?( ptrdiff_t, const T * );184 forall( otype T) volatile T * ?+?( volatile T *, ptrdiff_t );185 forall( otype T) volatile T * ?+?( ptrdiff_t, volatile T * );186 forall( otype T) const volatile T * ?+?( const volatile T *, ptrdiff_t );187 forall( otype T) const volatile T * ?+?( ptrdiff_t, const volatile T * );188 forall( otype T) T * ?-?( T *, ptrdiff_t );189 forall( otype T) const T * ?-?( const T *, ptrdiff_t );190 forall( otype T) volatile T * ?-?( volatile T *, ptrdiff_t );191 forall( otype T) const volatile T * ?-?( const volatile T *, ptrdiff_t );192 forall( otype T) ptrdiff_t ?-?( const volatile T *, const volatile T * );180 forall( dtype T | sized(T) ) T * ?+?( T *, ptrdiff_t ); 181 forall( dtype T | sized(T) ) T * ?+?( ptrdiff_t, T * ); 182 forall( dtype T | sized(T) ) const T * ?+?( const T *, ptrdiff_t ); 183 forall( dtype T | sized(T) ) const T * ?+?( ptrdiff_t, const T * ); 184 forall( dtype T | sized(T) ) volatile T * ?+?( volatile T *, ptrdiff_t ); 185 forall( dtype T | sized(T) ) volatile T * ?+?( ptrdiff_t, volatile T * ); 186 forall( dtype T | sized(T) ) const volatile T * ?+?( const volatile T *, ptrdiff_t ); 187 forall( dtype T | sized(T) ) const volatile T * ?+?( ptrdiff_t, const volatile T * ); 188 forall( dtype T | sized(T) ) T * ?-?( T *, ptrdiff_t ); 189 forall( dtype T | sized(T) ) const T * ?-?( const T *, ptrdiff_t ); 190 forall( dtype T | sized(T) ) volatile T * ?-?( volatile T *, ptrdiff_t ); 191 forall( dtype T | sized(T) ) const volatile T * ?-?( const volatile T *, ptrdiff_t ); 192 forall( dtype T | sized(T) ) ptrdiff_t ?-?( const volatile T *, const volatile T * ); 193 193 194 194 // ------------------------------------------------------------ … … 428 428 forall( ftype FT ) FT * ?=?( FT * volatile *, forall( ftype FT2 ) FT2 * ); 429 429 430 forall( otype T) T * ?+=?( T * *, ptrdiff_t );431 forall( otype T) T * ?+=?( T * volatile *, ptrdiff_t );432 forall( otype T) const T * ?+=?( const T * *, ptrdiff_t );433 forall( otype T) const T * ?+=?( const T * volatile *, ptrdiff_t );434 forall( otype T) volatile T * ?+=?( volatile T * *, ptrdiff_t );435 forall( otype T) volatile T * ?+=?( volatile T * volatile *, ptrdiff_t );436 forall( otype T) const volatile T * ?+=?( const volatile T * *, ptrdiff_t );437 forall( otype T) const volatile T * ?+=?( const volatile T * volatile *, ptrdiff_t );438 forall( otype T) T * ?-=?( T * *, ptrdiff_t );439 forall( otype T) T * ?-=?( T * volatile *, ptrdiff_t );440 forall( otype T) const T * ?-=?( const T * *, ptrdiff_t );441 forall( otype T) const T * ?-=?( const T * volatile *, ptrdiff_t );442 forall( otype T) volatile T * ?-=?( volatile T * *, ptrdiff_t );443 forall( otype T) volatile T * ?-=?( volatile T * volatile *, ptrdiff_t );444 forall( otype T) const volatile T * ?-=?( const volatile T * *, ptrdiff_t );445 forall( otype T) const volatile T * ?-=?( const volatile T * volatile *, ptrdiff_t );430 forall( dtype T | sized(T) ) T * ?+=?( T * *, ptrdiff_t ); 431 forall( dtype T | sized(T) ) T * ?+=?( T * volatile *, ptrdiff_t ); 432 forall( dtype T | sized(T) ) const T * ?+=?( const T * *, ptrdiff_t ); 433 forall( dtype T | sized(T) ) const T * ?+=?( const T * volatile *, ptrdiff_t ); 434 forall( dtype T | sized(T) ) volatile T * ?+=?( volatile T * *, ptrdiff_t ); 435 forall( dtype T | sized(T) ) volatile T * ?+=?( volatile T * volatile *, ptrdiff_t ); 436 forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T * *, ptrdiff_t ); 437 forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T * volatile *, ptrdiff_t ); 438 forall( dtype T | sized(T) ) T * ?-=?( T * *, ptrdiff_t ); 439 forall( dtype T | sized(T) ) T * ?-=?( T * volatile *, ptrdiff_t ); 440 forall( dtype T | sized(T) ) const T * ?-=?( const T * *, ptrdiff_t ); 441 forall( dtype T | sized(T) ) const T * ?-=?( const T * volatile *, ptrdiff_t ); 442 forall( dtype T | sized(T) ) volatile T * ?-=?( volatile T * *, ptrdiff_t ); 443 forall( dtype T | sized(T) ) volatile T * ?-=?( volatile T * volatile *, ptrdiff_t ); 444 forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T * *, ptrdiff_t ); 445 forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T * volatile *, ptrdiff_t ); 446 446 447 447 _Bool ?=?( _Bool *, _Bool ), ?=?( volatile _Bool *, _Bool ); -
src/tests/.expect/abs.txt
rc00ddfe r255b294 1 char ¿ abs A1 char -65 abs 65 2 2 signed int -65 abs 65 3 3 signed long int -65 abs 65 -
src/tests/abs.c
rc00ddfe r255b294 10 10 // Created On : Thu Jan 28 18:26:16 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 15:07:26 201613 // Update Count : 5 112 // Last Modified On : Wed Feb 22 22:31:03 2017 13 // Update Count : 52 14 14 // 15 15 … … 18 18 19 19 int main( void ) { 20 char ch = -65;20 signed char ch = -65; 21 21 sout | "char\t\t\t" | ch | "\tabs " | abs( ch ) | endl; 22 22 sout | "signed int\t\t" | -65 | "\tabs" | abs( -65 ) | endl;
Note:
See TracChangeset
for help on using the changeset viewer.