Changeset ad56482 for src/tests


Ignore:
Timestamp:
Jan 26, 2017, 12:03:57 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
0157ca7
Parents:
e15df4c (diff), ad6343e (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

Location:
src/tests/vector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tests/vector/array.c

    re15df4c rad56482  
    1616#include "array.h"
    1717
    18 /// forall( otype array_type, elt_type | bounded_array( array_type, elt_type ) )
    19 /// [ array_iterator begin, array_iterator end ]
    20 /// get_iterators( array_type array )
    21 /// {
    22 ///   begin = 0;
    23 ///   end = last( array );
    24 /// }
     18forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
     19[ elt_type * begin, elt_type * end ] get_iterators( array_type * array ) {
     20        return [ begin( array ), end( array ) ];
     21}
    2522
    2623// The first element is always at index 0.
  • src/tests/vector/array.h

    re15df4c rad56482  
    3232// implement iterator_for
    3333
    34 typedef int array_iterator;
    35 
    36 /// forall( otype array_type, elt_type | bounded_array( array_type, elt_type ) )
    37 /// [ array_iterator begin, array_iterator end ] get_iterators( array_type );
     34forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
     35[ elt_type * begin, elt_type * end ] get_iterators( array_type * );
    3836
    3937
Note: See TracChangeset for help on using the changeset viewer.