Ignore:
Timestamp:
Jun 30, 2016, 4:32:56 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:
ea29e73
Parents:
1b5c81ed (diff), 84d4d6f (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 gc_noraii

Conflicts:

Jenkinsfile
src/SymTab/Validate.cc

File:
1 moved

Legend:

Unmodified
Added
Removed
  • src/examples/Attributes.c

    r1b5c81ed rf80e0218  
    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);
Note: See TracChangeset for help on using the changeset viewer.