Changeset ff178ee


Ignore:
Timestamp:
Apr 12, 2017, 4:34:18 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
0d10090, 549950c
Parents:
e869e434
Message:

add relational operators for char and short to prelude

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/cfa-bench.c

    re869e434 rff178ee  
    2727        )
    2828
    29         stack(pair(_Bool, unsigned char)) s2;
     29        stack(pair(_Bool, char)) s2;
    3030        REPEAT_TIMED( "push_bool_char",
    31                 push( &s2, (pair(_Bool, unsigned char)){ rand() & 0x1, rand() & 0x7F } );
     31                push( &s2, (pair(_Bool, char)){ rand() & 0x1, rand() & 0x7F } );
    3232        )
    3333
    34         stack(pair(_Bool, unsigned char)) t2;
     34        stack(pair(_Bool, char)) t2;
    3535        TIMED( "copy_bool_char",
    3636                t2 = s2;
     
    4141        )
    4242
    43         pair(_Bool, unsigned char) max2 = { (_Bool)0, '\0' };
     43        pair(_Bool, char) max2 = { (_Bool)0, '\0' };
    4444        REPEAT_TIMED( "pop_bool_char",
    4545                max2 = max( max2, pop( &t2 ) );
  • src/prelude/prelude.cf

    re869e434 rff178ee  
    217217signed int ?<?( _Bool, _Bool ),                                         ?<=?( _Bool, _Bool ),
    218218           ?>?( _Bool, _Bool ),                                         ?>=?( _Bool, _Bool );
     219signed int ?<?( char, char ),                           ?<=?( char, char ),
     220           ?>?( char, char ),                           ?>=?( char, char );
     221signed int ?<?( signed char, signed char ),                             ?<=?( signed char, signed char ),
     222           ?>?( signed char, signed char ),                             ?>=?( signed char, signed char );
    219223signed int ?<?( unsigned char, unsigned char ),                         ?<=?( unsigned char, unsigned char ),
    220224           ?>?( unsigned char, unsigned char ),                         ?>=?( unsigned char, unsigned char );
     225signed int ?<?( signed short, signed short ),                           ?<=?( signed short, signed short ),
     226           ?>?( signed short, signed short ),                           ?>=?( signed short, signed short );
     227signed int ?<?( unsigned short, unsigned short ),                       ?<=?( unsigned short, unsigned short ),
     228           ?>?( unsigned short, unsigned short ),                               ?>=?( unsigned short, unsigned short );
    221229signed int ?<?( signed int, signed int ),                               ?<=?( signed int, signed int ),
    222230           ?>?( signed int, signed int ),                               ?>=?( signed int, signed int );
     
    265273
    266274signed int ?==?( _Bool, _Bool ),                                                        ?!=?( _Bool, _Bool );
     275signed int ?==?( char, char ),                                                          ?!=?( char, char );
     276signed int ?==?( signed char, signed char ),                            ?!=?( signed char, signed char );
     277signed int ?==?( unsigned char, unsigned char ),                        ?!=?( unsigned char, unsigned char );
     278signed int ?==?( signed short, signed short ),                          ?!=?( signed short, signed short );
     279signed int ?==?( unsigned short, unsigned short ),                      ?!=?( unsigned short, unsigned short );
    267280signed int ?==?( signed int, signed int ),                                      ?!=?( signed int, signed int );
    268281signed int ?==?( unsigned int, unsigned int ),                                  ?!=?( unsigned int, unsigned int );
Note: See TracChangeset for help on using the changeset viewer.