Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (11 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
dafbde8
Parents:
2f47ea4
Message:

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/common.hfa

    r2f47ea4 rfd54fef  
    2121[ long int, long int ] div( long int num, long int denom );
    2222[ long long int, long long int ] div( long long int num, long long int denom );
    23 forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
     23forall( T | { T ?/?( T, T ); T ?%?( T, T ); } )
    2424[ T, T ] div( T num, T demon );
    2525
     
    6161} // distribution
    6262
    63 forall( otype T | { void ?{}( T &, zero_t ); int ?<?( T, T ); T -?( T ); } )
     63forall( T | { void ?{}( T &, zero_t ); int ?<?( T, T ); T -?( T ); } )
    6464T abs( T );
    6565
     
    7070        intptr_t min( intptr_t t1, intptr_t t2 ) { return t1 < t2 ? t1 : t2; } // optimization
    7171        uintptr_t min( uintptr_t t1, uintptr_t t2 ) { return t1 < t2 ? t1 : t2; } // optimization
    72         forall( otype T | { int ?<?( T, T ); } )
     72        forall( T | { int ?<?( T, T ); } )
    7373        T min( T t1, T t2 ) { return t1 < t2 ? t1 : t2; }
    7474
     
    7676        intptr_t max( intptr_t t1, intptr_t t2 ) { return t1 > t2 ? t1 : t2; } // optimization
    7777        uintptr_t max( uintptr_t t1, uintptr_t t2 ) { return t1 > t2 ? t1 : t2; } // optimization
    78         forall( otype T | { int ?>?( T, T ); } )
     78        forall( T | { int ?>?( T, T ); } )
    7979        T max( T t1, T t2 ) { return t1 > t2 ? t1 : t2; }
    8080
    81         forall( otype T | { T min( T, T ); T max( T, T ); } )
     81        forall( T | { T min( T, T ); T max( T, T ); } )
    8282        T clamp( T value, T min_val, T max_val ) { return max( min_val, min( value, max_val ) ); }
    8383
    84         forall( otype T )
     84        forall( T )
    8585        void swap( T & v1, T & v2 ) { T temp = v1; v1 = v2; v2 = temp; }
    8686} // distribution
Note: See TracChangeset for help on using the changeset viewer.