Changeset 0c81320


Ignore:
Timestamp:
Mar 19, 2019, 10:46:50 AM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
f1c1339
Parents:
1528a2c
Message:

add one_t constructor to prelude, remove one_t constructor from test programs

Files:
3 edited

Legend:

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

    r1528a2c r0c81320  
    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;
  • tests/forall.cfa

    r1528a2c r0c81320  
    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

    r1528a2c r0c81320  
    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.