Changeset c0d00b6 for src/prelude


Ignore:
Timestamp:
Nov 25, 2017, 3:22:18 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
c6e2c18
Parents:
9d06142 (diff), 3de176d (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' into cleanup-dtors

Location:
src/prelude
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/prelude/builtins.c

    r9d06142 rc0d00b6  
    8080} // ?\?
    8181
    82 static inline forall( otype T | { void ?{}( T & this, one_t ); T ?*?( T, T ); double ?/?( double, T ); } )
    83 double ?\?( T x, signed long int y ) {
    84     if ( y >=  0 ) return (double)(x \ (unsigned long int)y);
    85     else return 1.0 / x \ (unsigned long int)(-y);
    86 } // ?\?
     82// FIXME (x \ (unsigned long int)y) relies on X ?\?(T, unsigned long) a function that is neither
     83// defined, nor passed as an assertion parameter. Without user-defined conversions, cannot specify
     84// X as a type that casts to double, yet it doesn't make sense to write functions with that type
     85// signature where X is double.
     86
     87// static inline forall( otype T | { void ?{}( T & this, one_t ); T ?*?( T, T ); double ?/?( double, T ); } )
     88// double ?\?( T x, signed long int y ) {
     89//     if ( y >=  0 ) return (double)(x \ (unsigned long int)y);
     90//     else return 1.0 / x \ (unsigned long int)(-y);
     91// } // ?\?
    8792
    8893static inline long int ?\=?( long int & x, unsigned long int y ) { x = x \ y; return x; }
  • src/prelude/prelude.cf

    r9d06142 rc0d00b6  
    403403forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const volatile    DT * );
    404404
    405 forall( dtype DT ) DT *                 ?=?(                 DT *          &,                   void * );
    406 forall( dtype DT ) DT *                 ?=?(                 DT * volatile &,                   void * );
    407 forall( dtype DT ) const DT *           ?=?( const           DT *          &,                   void * );
    408 forall( dtype DT ) const DT *           ?=?( const           DT * volatile &,                   void * );
    409 forall( dtype DT ) const DT *           ?=?( const           DT *          &, const             void * );
    410 forall( dtype DT ) const DT *           ?=?( const           DT * volatile &, const             void * );
    411 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          &,                   void * );
    412 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile &,                   void * );
    413 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT *          &,       volatile    void * );
    414 forall( dtype DT ) volatile DT *        ?=?(       volatile  DT * volatile &,       volatile    void * );
    415 
    416 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &,                   void * );
    417 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &,                   void * );
    418 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &, const             void * );
    419 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const             void * );
    420 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &,       volatile    void * );
    421 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &,       volatile    void * );
    422 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT *          &, const volatile    void * );
    423 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const volatile    void * );
    424 
    425405forall( dtype DT ) void *                ?=?(                void *          &,                 DT * );
    426406forall( dtype DT ) void *                ?=?(                void * volatile &,                 DT * );
     
    441421forall( dtype DT ) const volatile void * ?=?( const volatile void *          &, const volatile  DT * );
    442422forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile &, const volatile  DT * );
    443 
    444 void *                  ?=?(                void *          &,                void * );
    445 void *                  ?=?(                void * volatile &,                void * );
    446 const void *            ?=?( const          void *          &,                void * );
    447 const void *            ?=?( const          void * volatile &,                void * );
    448 const void *            ?=?( const          void *          &, const          void * );
    449 const void *            ?=?( const          void * volatile &, const          void * );
    450 volatile void *         ?=?(       volatile void *          &,                void * );
    451 volatile void *         ?=?(       volatile void * volatile &,                void * );
    452 volatile void *         ?=?(       volatile void *          &,       volatile void * );
    453 volatile void *         ?=?(       volatile void * volatile &,       volatile void * );
    454 const volatile void *   ?=?( const volatile void *          &,                void * );
    455 const volatile void *   ?=?( const volatile void * volatile &,                void * );
    456 const volatile void *   ?=?( const volatile void *          &, const          void * );
    457 const volatile void *   ?=?( const volatile void * volatile &, const          void * );
    458 const volatile void *   ?=?( const volatile void *          &,       volatile void * );
    459 const volatile void *   ?=?( const volatile void * volatile &,       volatile void * );
    460 const volatile void *   ?=?( const volatile void *          &, const volatile void * );
    461 const volatile void *   ?=?( const volatile void * volatile &, const volatile void * );
    462423
    463424//forall( dtype DT ) DT *                       ?=?(                DT *          &, zero_t );
     
    781742forall( dtype DT ) void ?{}( const volatile  DT *          &, const volatile    DT * );
    782743
    783 forall( dtype DT ) void ?{}(                 DT *          &,                   void * );
    784 forall( dtype DT ) void ?{}( const           DT *          &,                   void * );
    785 forall( dtype DT ) void ?{}( const           DT *          &, const             void * );
    786 forall( dtype DT ) void ?{}(       volatile  DT *          &,                   void * );
    787 forall( dtype DT ) void ?{}(       volatile  DT *          &,       volatile    void * );
    788 
    789 forall( dtype DT ) void ?{}( const volatile  DT *          &,                   void * );
    790 forall( dtype DT ) void ?{}( const volatile  DT *          &, const             void * );
    791 forall( dtype DT ) void ?{}( const volatile  DT *          &,       volatile    void * );
    792 forall( dtype DT ) void ?{}( const volatile  DT *          &, const volatile    void * );
    793 
    794744forall( dtype DT ) void ?{}(                 void *          &,                 DT * );
    795745forall( dtype DT ) void ?{}( const           void *          &,                 DT * );
     
    802752forall( dtype DT ) void ?{}( const volatile void *           &, const volatile  DT * );
    803753
    804 void    ?{}(                void *          &,                void * );
    805 void    ?{}( const          void *          &,                void * );
    806 void    ?{}( const          void *          &, const          void * );
    807 void    ?{}(       volatile void *          &,                void * );
    808 void    ?{}(       volatile void *          &,       volatile void * );
    809 void    ?{}( const volatile void *          &,                void * );
    810 void    ?{}( const volatile void *          &, const          void * );
    811 void    ?{}( const volatile void *          &,       volatile void * );
    812 void    ?{}( const volatile void *          &, const volatile void * );
    813 
    814754//forall( dtype DT ) void ?{}(              DT *          &, zero_t );
    815755//forall( dtype DT ) void ?{}(              DT * volatile &, zero_t );
Note: See TracChangeset for help on using the changeset viewer.