Changeset f1c1339


Ignore:
Timestamp:
Mar 19, 2019, 1:01:54 PM (3 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
2e041e27, be3416d
Parents:
9cb4fc8 (diff), 0c81320 (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

Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/prelude-gen.cc

    r9cb4fc8 rf1c1339  
    1010// Created On       : Sat Feb 16 08:44:58 2019
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar  8 16:00:22 2019
    13 // Update Count     : 26
     12// Last Modified On : Tue Mar 19 08:19:35 2019
     13// Update Count     : 28
    1414//
    1515
     
    208208                cout << "void ?{} (" << type << " &);" << endl;
    209209                cout << "void ?{} (" << type << " &, " << type << ");" << endl;
    210                 cout << type << "  ?=? (" << type << " &, " << type << ")";
     210                cout << type << " ?=? (" << type << " &, " << type << ")";
    211211                if ( do_volatile ) {
    212                         cout << ",  ?=?(volatile " << type << " &, " << type << ")";
     212                        cout << ", ?=?(volatile " << type << " &, " << type << ")";
    213213                }
    214214                cout << ";" << endl;
     
    217217
    218218        otype("zero_t");
     219        cout << endl;
    219220        otype("one_t");
     221        cout << endl;
    220222        otype("_Bool", true);
    221223        cout << endl;
     
    225227                cout << "void ?{}(" << type.name << " &, " << type.name << ");" << endl;
    226228                cout << "void ?{}(" << type.name << " &, zero_t);" << endl;
     229                cout << "void ?{}(" << type.name << " &, one_t);" << endl;
    227230                cout << "void ^?{}(" << type.name << " &);" << endl;
    228231                cout << endl;
  • libcfa/src/concurrency/coroutine.hfa

    r9cb4fc8 rf1c1339  
    4646//-----------------------------------------------------------------------------
    4747// Public coroutine API
    48 static inline void suspend();
     48static inline void suspend(void);
    4949
    5050forall(dtype T | is_coroutine(T))
     
    7171
    7272// Suspend implementation inlined for performance
    73 static inline void suspend() {
     73static inline void suspend(void) {
    7474        // optimization : read TLS once and reuse it
    7575        // Safety note: this is preemption safe since if
  • src/Parser/lex.ll

    r9cb4fc8 rf1c1339  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sun Mar 10 09:13:09 2019
    13  * Update Count     : 706
     12 * Last Modified On : Wed Mar 13 14:54:30 2019
     13 * Update Count     : 707
    1414 */
    1515
     
    226226char                    { KEYWORD_RETURN(CHAR); }
    227227choose                  { KEYWORD_RETURN(CHOOSE); }                             // CFA
     228coerce                  { KEYWORD_RETURN(COERCE); }                             // CFA
    228229_Complex                { KEYWORD_RETURN(COMPLEX); }                    // C99
    229230__complex               { KEYWORD_RETURN(COMPLEX); }                    // GCC
  • src/Parser/parser.yy

    r9cb4fc8 rf1c1339  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 21 08:45:07 2019
    13 // Update Count     : 4232
     12// Last Modified On : Fri Mar 15 14:25:43 2019
     13// Update Count     : 4248
    1414//
    1515
     
    265265%token RESTRICT                                                                                 // C99
    266266%token ATOMIC                                                                                   // C11
    267 %token FORALL MUTEX VIRTUAL                                                             // CFA
     267%token FORALL MUTEX VIRTUAL COERCE                                              // CFA
    268268%token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED
    269269%token BOOL COMPLEX IMAGINARY                                                   // C99
     
    795795        | '(' type_no_function ')' cast_expression
    796796                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
     797                // keyword cast cannot be grouped because of reduction in aggregate_key
    797798        | '(' COROUTINE '&' ')' cast_expression                         // CFA
    798799                { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Coroutine, $5 ) ); }
     
    806807        | '(' VIRTUAL type_no_function ')' cast_expression      // CFA
    807808                { $$ = new ExpressionNode( new VirtualCastExpr( maybeMoveBuild< Expression >( $5 ), maybeMoveBuildType( $3 ) ) ); }
     809        | '(' RETURN type_no_function ')' cast_expression       // CFA
     810                { SemanticError( yylloc, "Return cast is currently unimplemented." ); $$ = nullptr; }
     811        | '(' COERCE type_no_function ')' cast_expression       // CFA
     812                { SemanticError( yylloc, "Coerce cast is currently unimplemented." ); $$ = nullptr; }
     813        | '(' qualifier_cast_list ')' cast_expression           // CFA
     814                { SemanticError( yylloc, "Qualifier cast is currently unimplemented." ); $$ = nullptr; }
    808815//      | '(' type_no_function ')' tuple
    809816//              { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
     817        ;
     818
     819qualifier_cast_list:
     820        cast_modifier type_qualifier_name
     821        | cast_modifier MUTEX
     822        | qualifier_cast_list cast_modifier type_qualifier_name
     823        | qualifier_cast_list cast_modifier MUTEX
     824        ;
     825
     826cast_modifier:
     827        '-'
     828        | '+'
    810829        ;
    811830
  • tests/forall.cfa

    r9cb4fc8 rf1c1339  
    1010// Created On       : Wed May  9 08:48:15 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:53:43 2018
    13 // Update Count     : 31
     12// Last Modified On : Tue Mar 19 08:29:38 2019
     13// Update Count     : 32
    1414//
    1515
     
    5353        right = temp;
    5454}
    55 
    56 void ?{}( int & c, zero_t ) { c = 0; }                                  // not in prelude
    5755
    5856trait sumable( otype T ) {
  • tests/rational.cfa

    r9cb4fc8 rf1c1339  
    1010// Created On       : Mon Mar 28 08:43:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  4 21:46:42 2018
    13 // Update Count     : 69
     12// Last Modified On : Tue Mar 19 08:30:28 2019
     13// Update Count     : 73
    1414//
    1515
     
    1919#include <fstream.hfa>
    2020
    21 // UNNECESSARY, FIX ME
    22 void ?{}( int & this ) { this = 0; }
    23 void ?{}( int & this, zero_t ) { this = 0; }
    24 void ?{}( int & this, one_t ) { this = 1; }
    2521double convert( int i ) { return (double)i; }
    2622int convert( double d ) { return (int)d; }
Note: See TracChangeset for help on using the changeset viewer.