Changeset 7ff30d07 for src/Tests


Ignore:
Timestamp:
Jun 14, 2016, 1:23:18 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
545ef59, c738ca4, ee51534
Parents:
6cbc25a (diff), c8c03683 (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

Conflicts:

Makefile.in
aclocal.m4
configure
src/Makefile.in
src/Tests/Context.c
src/driver/Makefile.in
src/examples/Makefile.in
src/examples/ctxts.c
src/examples/esskaykay.c
src/libcfa/Makefile.in

Location:
src/Tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/Tests/Abstype.c

    r6cbc25a r7ff30d07  
    1 type T | { T x( T ); };
     1otype T | { T x( T ); };
    22
    33T y( T t ) {
     
    66}
    77
    8 forall( type T ) lvalue T *?( T * );
     8forall( otype T ) lvalue T *?( T * );
    99int ?++( int * );
    1010int ?=?( int *, int );
    1111forall( dtype DT ) DT * ?=?( DT **, DT * );
    1212
    13 type U = int *;
     13otype U = int *;
    1414
    1515U x( U u ) {
  • src/Tests/Attributes.c

    r6cbc25a r7ff30d07  
    66//    @max
    77//
    8 // 2. a direct application to a manifest type
     8// 2. a direct application to a manifest otype
    99//
    1010//    @max( int )
    1111//
    12 // 3. constraining a type variable; the application is implicitly performed at the call site as in (2)
     12// 3. constraining a otype variable; the application is implicitly performed at the call site as in (2)
    1313//
    14 //    forall( type T | { T @max( T ); } ) T x( T t );
     14//    forall( otype T | { T @max( T ); } ) T x( T t );
    1515//
    1616//
     
    2323//    x = (*attr_var);
    2424//
    25 // 2. an indirect application to a manifest type
     25// 2. an indirect application to a manifest otype
    2626//
    2727//    (*attr_var)( int )
    2828//
    29 // 3. a direct application to a type variable
     29// 3. a direct application to a otype variable
    3030//
    3131//    @max( T )
     
    4747// 3. polymorphic
    4848//
    49 //    forall( type T | constraint( T ) ) int @attr( T );
     49//    forall( otype T | constraint( T ) ) int @attr( T );
    5050
    5151int @max = 3;
     
    5353int main() {
    5454    int x;
    55     type @type(type t);                                                                 // compiler intrinsic
    56     type @widest(type t);
    57     @type(x) *y;                                                                                // gcc: typeof(x) *y;
    58     const @widest(double) *w;                                                   // gcc: const typeof(x) *w;
    59     * @type(3 + 4) z;                                                                   // cfa declaration syntax
     55    otype @otype(otype t);                                                                      // compiler intrinsic
     56    otype @widest(otype t);
     57    @otype(x) *y;                                                                               // gcc: otypeof(x) *y;
     58    const @widest(double) *w;                                                   // gcc: const otypeof(x) *w;
     59    * @otype(3 + 4) z;                                                                  // cfa declaration syntax
    6060    y = @max;           
    6161    z = @max(x) + @size(int);
  • src/Tests/InferParam.c

    r6cbc25a r7ff30d07  
    33double ?=?( double*, double );
    44
    5 forall( type T, type U | { U f(T); } ) U g(T);
     5forall( otype T, otype U | { U f(T); } ) U g(T);
    66float f( int );
    77double f( int );
     
    1313}
    1414
    15 context has_f_and_j( type T, type U ) {
     15context has_f_and_j( otype T, otype U ) {
    1616        U f( T );
    1717        U j( T, U );
     
    1919
    2020float j( int, float );
    21 forall( type T, type U | has_f_and_j( T, U ) ) U k( T );
     21forall( otype T, otype U | has_f_and_j( T, U ) ) U k( T );
    2222
    2323void l() {
  • src/Tests/Makefile

    r6cbc25a r7ff30d07  
    1 CFA ?= ../cfa-cpp
     1CFA ?= ../driver/cfa-cpp
    22CFAOPT ?= -a
    33OUTPUT ?= Output
     
    3232
    3333${OUTPUTDIR} :
    34         mkdir $@
     34        mkdir -p $@
    3535
    3636# remove the expected results directories to generate new ones from the current output
  • src/Tests/Members.c

    r6cbc25a r7ff30d07  
    33float ?=?( float*, float );
    44forall( dtype DT ) DT * ?=?( DT**, DT* );
    5 forall(type T) lvalue T *?( T* );
     5forall(otype T) lvalue T *?( T* );
    66char *__builtin_memcpy();
    77
  • src/Tests/OccursError.c

    r6cbc25a r7ff30d07  
    1 forall( type T ) void f( void (*)( T, T* ) );
    2 forall( type U ) void g( U*, U );
     1forall( otype T ) void f( void (*)( T, T* ) );
     2forall( otype U ) void g( U*, U );
    33
    44void test() {
  • src/Tests/Quad.c

    r6cbc25a r7ff30d07  
    22int ?*?( int, int );
    33
    4 forall( type T | { T ?*?( T, T ); } )
     4forall( otype T | { T ?*?( T, T ); } )
    55T square( T t ) {
    66        return t * t;
    77}
    88
    9 forall( type U | { U square( U ); } )
     9forall( otype U | { U square( U ); } )
    1010U quad( U u ) {
    1111        return square( square( u ) );
  • src/Tests/Rank2.c

    r6cbc25a r7ff30d07  
    33
    44void a() {
    5         forall( type T ) void f( T );
    6         void g( forall( type U ) void p( U ) );
     5        forall( otype T ) void f( T );
     6        void g( forall( otype U ) void p( U ) );
    77        g( f );
    88}
     
    1010void g() {
    1111        void h( int *null );
    12         forall( type T ) T id( T );
     12        forall( otype T ) T id( T );
    1313        forall( dtype T ) T *0;
    1414        int 0;
Note: See TracChangeset for help on using the changeset viewer.