Changeset f80e0218 for src/examples


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

Location:
src/examples
Files:
4 added
8 deleted
6 edited
9 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);
  • src/examples/Initialization.c

    r1b5c81ed rf80e0218  
    1212} a = { .w : [2] };
    1313
    14 struct { int a[3], b; } w [] = { [0].a : {1}, [0].b : 1, [1].a[0] : 2 };
     14struct { int a[3], b; } w [] = { [0].a : {1}, [0].b : 3, [1].a[0] : 2 };
    1515
    1616struct {
  • src/examples/Makefile.am

    r1b5c81ed rf80e0218  
    66## file "LICENCE" distributed with Cforall.
    77##
    8 ## Makefile.am -- 
     8## Makefile.am --
    99##
    1010## Author           : Peter A. Buhr
     
    1919CC = @CFA_BINDIR@/cfa
    2020
    21 noinst_PROGRAMS = fstream_test vector_test # build but do not install
     21noinst_PROGRAMS = fstream_test vector_test avl_test # build but do not install
    2222fstream_test_SOURCES = fstream_test.c
    2323vector_test_SOURCES = vector_int.c array.c vector_test.c
     24avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
  • src/examples/Makefile.example

    r1b5c81ed rf80e0218  
    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/examples/Makefile.in

    r1b5c81ed rf80e0218  
    3636PRE_UNINSTALL = :
    3737POST_UNINSTALL = :
    38 noinst_PROGRAMS = fstream_test$(EXEEXT) vector_test$(EXEEXT)
     38noinst_PROGRAMS = fstream_test$(EXEEXT) vector_test$(EXEEXT) \
     39        avl_test$(EXEEXT)
    3940subdir = src/examples
    4041DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     
    4849CONFIG_CLEAN_VPATH_FILES =
    4950PROGRAMS = $(noinst_PROGRAMS)
     51am_avl_test_OBJECTS = avl_test.$(OBJEXT) avl0.$(OBJEXT) avl1.$(OBJEXT) \
     52        avl2.$(OBJEXT) avl3.$(OBJEXT) avl4.$(OBJEXT) \
     53        avl-private.$(OBJEXT)
     54avl_test_OBJECTS = $(am_avl_test_OBJECTS)
     55avl_test_LDADD = $(LDADD)
    5056am_fstream_test_OBJECTS = fstream_test.$(OBJEXT)
    5157fstream_test_OBJECTS = $(am_fstream_test_OBJECTS)
     
    5965am__depfiles_maybe = depfiles
    6066am__mv = mv -f
     67AM_V_lt = $(am__v_lt_@AM_V@)
     68am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
     69am__v_lt_0 = --silent
    6170COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    6271        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     72AM_V_CC = $(am__v_CC_@AM_V@)
     73am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
     74am__v_CC_0 = @echo "  CC    " $@;
     75AM_V_at = $(am__v_at_@AM_V@)
     76am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
     77am__v_at_0 = @
    6378CCLD = $(CC)
    6479LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
    65 SOURCES = $(fstream_test_SOURCES) $(vector_test_SOURCES)
    66 DIST_SOURCES = $(fstream_test_SOURCES) $(vector_test_SOURCES)
     80AM_V_CCLD = $(am__v_CCLD_@AM_V@)
     81am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
     82am__v_CCLD_0 = @echo "  CCLD  " $@;
     83AM_V_GEN = $(am__v_GEN_@AM_V@)
     84am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
     85am__v_GEN_0 = @echo "  GEN   " $@;
     86SOURCES = $(avl_test_SOURCES) $(fstream_test_SOURCES) \
     87        $(vector_test_SOURCES)
     88DIST_SOURCES = $(avl_test_SOURCES) $(fstream_test_SOURCES) \
     89        $(vector_test_SOURCES)
    6790ETAGS = etags
    6891CTAGS = ctags
     
    7194ALLOCA = @ALLOCA@
    7295AMTAR = @AMTAR@
     96AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
    7397AUTOCONF = @AUTOCONF@
    7498AUTOHEADER = @AUTOHEADER@
     
    78102CC = @CFA_BINDIR@/cfa
    79103CCDEPMODE = @CCDEPMODE@
     104CFA_BACKEND_CC = @CFA_BACKEND_CC@
    80105CFA_BINDIR = @CFA_BINDIR@
    81106CFA_INCDIR = @CFA_INCDIR@
     
    98123EGREP = @EGREP@
    99124EXEEXT = @EXEEXT@
    100 GCC_PATH = @GCC_PATH@
    101125GREP = @GREP@
    102126INSTALL = @INSTALL@
     
    176200fstream_test_SOURCES = fstream_test.c
    177201vector_test_SOURCES = vector_int.c array.c vector_test.c
     202avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
    178203all: all-am
    179204
     
    213238clean-noinstPROGRAMS:
    214239        -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
     240avl_test$(EXEEXT): $(avl_test_OBJECTS) $(avl_test_DEPENDENCIES) $(EXTRA_avl_test_DEPENDENCIES)
     241        @rm -f avl_test$(EXEEXT)
     242        $(AM_V_CCLD)$(LINK) $(avl_test_OBJECTS) $(avl_test_LDADD) $(LIBS)
    215243fstream_test$(EXEEXT): $(fstream_test_OBJECTS) $(fstream_test_DEPENDENCIES) $(EXTRA_fstream_test_DEPENDENCIES)
    216244        @rm -f fstream_test$(EXEEXT)
    217         $(LINK) $(fstream_test_OBJECTS) $(fstream_test_LDADD) $(LIBS)
     245        $(AM_V_CCLD)$(LINK) $(fstream_test_OBJECTS) $(fstream_test_LDADD) $(LIBS)
    218246vector_test$(EXEEXT): $(vector_test_OBJECTS) $(vector_test_DEPENDENCIES) $(EXTRA_vector_test_DEPENDENCIES)
    219247        @rm -f vector_test$(EXEEXT)
    220         $(LINK) $(vector_test_OBJECTS) $(vector_test_LDADD) $(LIBS)
     248        $(AM_V_CCLD)$(LINK) $(vector_test_OBJECTS) $(vector_test_LDADD) $(LIBS)
    221249
    222250mostlyclean-compile:
     
    227255
    228256@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
     257@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl-private.Po@am__quote@
     258@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl0.Po@am__quote@
     259@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl1.Po@am__quote@
     260@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl2.Po@am__quote@
     261@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl3.Po@am__quote@
     262@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl4.Po@am__quote@
     263@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avl_test.Po@am__quote@
    229264@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream_test.Po@am__quote@
    230265@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int.Po@am__quote@
     
    232267
    233268.c.o:
    234 @am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
    235 @am__fastdepCC_TRUE@    $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
    236 @AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    237 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    238 @am__fastdepCC_FALSE@   $(COMPILE) -c $<
     269@am__fastdepCC_TRUE@    $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
     270@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
     271@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     272@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     273@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
    239274
    240275.c.obj:
    241 @am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
    242 @am__fastdepCC_TRUE@    $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
    243 @AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    244 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    245 @am__fastdepCC_FALSE@   $(COMPILE) -c `$(CYGPATH_W) '$<'`
     276@am__fastdepCC_TRUE@    $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
     277@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
     278@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     279@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     280@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
     281
     282avl_test.o: avltree/avl_test.c
     283@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl_test.o -MD -MP -MF $(DEPDIR)/avl_test.Tpo -c -o avl_test.o `test -f 'avltree/avl_test.c' || echo '$(srcdir)/'`avltree/avl_test.c
     284@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl_test.Tpo $(DEPDIR)/avl_test.Po
     285@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl_test.c' object='avl_test.o' libtool=no @AMDEPBACKSLASH@
     286@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     287@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl_test.o `test -f 'avltree/avl_test.c' || echo '$(srcdir)/'`avltree/avl_test.c
     288
     289avl_test.obj: avltree/avl_test.c
     290@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl_test.obj -MD -MP -MF $(DEPDIR)/avl_test.Tpo -c -o avl_test.obj `if test -f 'avltree/avl_test.c'; then $(CYGPATH_W) 'avltree/avl_test.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl_test.c'; fi`
     291@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl_test.Tpo $(DEPDIR)/avl_test.Po
     292@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl_test.c' object='avl_test.obj' libtool=no @AMDEPBACKSLASH@
     293@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     294@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl_test.obj `if test -f 'avltree/avl_test.c'; then $(CYGPATH_W) 'avltree/avl_test.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl_test.c'; fi`
     295
     296avl0.o: avltree/avl0.c
     297@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl0.o -MD -MP -MF $(DEPDIR)/avl0.Tpo -c -o avl0.o `test -f 'avltree/avl0.c' || echo '$(srcdir)/'`avltree/avl0.c
     298@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl0.Tpo $(DEPDIR)/avl0.Po
     299@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl0.c' object='avl0.o' libtool=no @AMDEPBACKSLASH@
     300@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     301@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl0.o `test -f 'avltree/avl0.c' || echo '$(srcdir)/'`avltree/avl0.c
     302
     303avl0.obj: avltree/avl0.c
     304@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl0.obj -MD -MP -MF $(DEPDIR)/avl0.Tpo -c -o avl0.obj `if test -f 'avltree/avl0.c'; then $(CYGPATH_W) 'avltree/avl0.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl0.c'; fi`
     305@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl0.Tpo $(DEPDIR)/avl0.Po
     306@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl0.c' object='avl0.obj' libtool=no @AMDEPBACKSLASH@
     307@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     308@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl0.obj `if test -f 'avltree/avl0.c'; then $(CYGPATH_W) 'avltree/avl0.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl0.c'; fi`
     309
     310avl1.o: avltree/avl1.c
     311@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl1.o -MD -MP -MF $(DEPDIR)/avl1.Tpo -c -o avl1.o `test -f 'avltree/avl1.c' || echo '$(srcdir)/'`avltree/avl1.c
     312@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl1.Tpo $(DEPDIR)/avl1.Po
     313@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl1.c' object='avl1.o' libtool=no @AMDEPBACKSLASH@
     314@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     315@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl1.o `test -f 'avltree/avl1.c' || echo '$(srcdir)/'`avltree/avl1.c
     316
     317avl1.obj: avltree/avl1.c
     318@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl1.obj -MD -MP -MF $(DEPDIR)/avl1.Tpo -c -o avl1.obj `if test -f 'avltree/avl1.c'; then $(CYGPATH_W) 'avltree/avl1.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl1.c'; fi`
     319@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl1.Tpo $(DEPDIR)/avl1.Po
     320@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl1.c' object='avl1.obj' libtool=no @AMDEPBACKSLASH@
     321@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     322@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl1.obj `if test -f 'avltree/avl1.c'; then $(CYGPATH_W) 'avltree/avl1.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl1.c'; fi`
     323
     324avl2.o: avltree/avl2.c
     325@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl2.o -MD -MP -MF $(DEPDIR)/avl2.Tpo -c -o avl2.o `test -f 'avltree/avl2.c' || echo '$(srcdir)/'`avltree/avl2.c
     326@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl2.Tpo $(DEPDIR)/avl2.Po
     327@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl2.c' object='avl2.o' libtool=no @AMDEPBACKSLASH@
     328@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     329@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl2.o `test -f 'avltree/avl2.c' || echo '$(srcdir)/'`avltree/avl2.c
     330
     331avl2.obj: avltree/avl2.c
     332@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl2.obj -MD -MP -MF $(DEPDIR)/avl2.Tpo -c -o avl2.obj `if test -f 'avltree/avl2.c'; then $(CYGPATH_W) 'avltree/avl2.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl2.c'; fi`
     333@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl2.Tpo $(DEPDIR)/avl2.Po
     334@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl2.c' object='avl2.obj' libtool=no @AMDEPBACKSLASH@
     335@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     336@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl2.obj `if test -f 'avltree/avl2.c'; then $(CYGPATH_W) 'avltree/avl2.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl2.c'; fi`
     337
     338avl3.o: avltree/avl3.c
     339@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl3.o -MD -MP -MF $(DEPDIR)/avl3.Tpo -c -o avl3.o `test -f 'avltree/avl3.c' || echo '$(srcdir)/'`avltree/avl3.c
     340@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl3.Tpo $(DEPDIR)/avl3.Po
     341@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl3.c' object='avl3.o' libtool=no @AMDEPBACKSLASH@
     342@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     343@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl3.o `test -f 'avltree/avl3.c' || echo '$(srcdir)/'`avltree/avl3.c
     344
     345avl3.obj: avltree/avl3.c
     346@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl3.obj -MD -MP -MF $(DEPDIR)/avl3.Tpo -c -o avl3.obj `if test -f 'avltree/avl3.c'; then $(CYGPATH_W) 'avltree/avl3.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl3.c'; fi`
     347@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl3.Tpo $(DEPDIR)/avl3.Po
     348@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl3.c' object='avl3.obj' libtool=no @AMDEPBACKSLASH@
     349@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     350@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl3.obj `if test -f 'avltree/avl3.c'; then $(CYGPATH_W) 'avltree/avl3.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl3.c'; fi`
     351
     352avl4.o: avltree/avl4.c
     353@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl4.o -MD -MP -MF $(DEPDIR)/avl4.Tpo -c -o avl4.o `test -f 'avltree/avl4.c' || echo '$(srcdir)/'`avltree/avl4.c
     354@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl4.Tpo $(DEPDIR)/avl4.Po
     355@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl4.c' object='avl4.o' libtool=no @AMDEPBACKSLASH@
     356@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     357@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl4.o `test -f 'avltree/avl4.c' || echo '$(srcdir)/'`avltree/avl4.c
     358
     359avl4.obj: avltree/avl4.c
     360@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl4.obj -MD -MP -MF $(DEPDIR)/avl4.Tpo -c -o avl4.obj `if test -f 'avltree/avl4.c'; then $(CYGPATH_W) 'avltree/avl4.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl4.c'; fi`
     361@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl4.Tpo $(DEPDIR)/avl4.Po
     362@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl4.c' object='avl4.obj' libtool=no @AMDEPBACKSLASH@
     363@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     364@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl4.obj `if test -f 'avltree/avl4.c'; then $(CYGPATH_W) 'avltree/avl4.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl4.c'; fi`
     365
     366avl-private.o: avltree/avl-private.c
     367@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl-private.o -MD -MP -MF $(DEPDIR)/avl-private.Tpo -c -o avl-private.o `test -f 'avltree/avl-private.c' || echo '$(srcdir)/'`avltree/avl-private.c
     368@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl-private.Tpo $(DEPDIR)/avl-private.Po
     369@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl-private.c' object='avl-private.o' libtool=no @AMDEPBACKSLASH@
     370@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     371@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl-private.o `test -f 'avltree/avl-private.c' || echo '$(srcdir)/'`avltree/avl-private.c
     372
     373avl-private.obj: avltree/avl-private.c
     374@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avl-private.obj -MD -MP -MF $(DEPDIR)/avl-private.Tpo -c -o avl-private.obj `if test -f 'avltree/avl-private.c'; then $(CYGPATH_W) 'avltree/avl-private.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl-private.c'; fi`
     375@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/avl-private.Tpo $(DEPDIR)/avl-private.Po
     376@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='avltree/avl-private.c' object='avl-private.obj' libtool=no @AMDEPBACKSLASH@
     377@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     378@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avl-private.obj `if test -f 'avltree/avl-private.c'; then $(CYGPATH_W) 'avltree/avl-private.c'; else $(CYGPATH_W) '$(srcdir)/avltree/avl-private.c'; fi`
    246379
    247380ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  • src/examples/Members.c

    r1b5c81ed rf80e0218  
    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/examples/Misc.c

    r1b5c81ed rf80e0218  
     1// interesting corner cases
     2
    13int a;
    24int b;
  • src/examples/Rank2.c

    r1b5c81ed rf80e0218  
    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;
  • src/examples/abstype.c

    r1b5c81ed rf80e0218  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 27 18:10:01 2015
    13 // Update Count     : 4
     12// Last Modified On : Tue Jun 14 14:27:48 2016
     13// Update Count     : 9
    1414//
    1515
    16 type T | { T x( T ); };
     16otype T | { T x( T ); };
    1717
    1818T y( T t ) {
     
    2121}
    2222
    23 forall(type T) lvalue T *?( T* );
    24 int ?++( int *);
    25 int ?=?( int*, int );
    26 forall(dtype DT) DT* ?=?( DT **, DT* );
     23forall( otype T ) lvalue T *?( T * );
     24int ?++( int * );
     25int ?=?( int *, int );
     26forall( dtype DT ) DT * ?=?( DT **, DT * );
    2727
    28 type U = int*;
     28otype U = int *;
    2929
    3030U x( U u ) {
  • src/examples/alloc.c

    r1b5c81ed rf80e0218  
    1111// Created On       : Wed Feb  3 07:56:22 2016
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Wed Feb 17 11:43:23 2016
    14 // Update Count     : 40
     13// Last Modified On : Fri Mar 11 17:42:08 2016
     14// Update Count     : 59
    1515//
    1616
     17forall( otype T ) T * malloc( char fill );
     18forall( dtype T ) T *?=?( T **, void * );
     19void *malloc( unsigned long int );
     20#if 0
    1721#include <fstream>
    1822#include <stdlib>
     
    2529int * bar( int * p, int c ) { return p; }
    2630int * baz( int * p, int c ) { return p; }
     31#endif
    2732
    2833int main( void ) {
     34#if 0
    2935    size_t size = 10;
    3036    int * p;
    3137    struct S { int x; double y; } * s;
     38#endif
    3239
     40#if 0
    3341    p = malloc( sizeof(*p) );                                                   // C malloc, type unsafe
    3442        printf( "here1\n" );
     
    3745        printf( "here2\n" );
    3846    free( p );
    39     p = malloc( (char)'\0' );                                                                   // CFA malloc, type safe
     47#endif
     48//    int * p;
     49//    p = malloc( (char)'\0' );                                                                 // CFA malloc, type safe
     50    (int *)malloc( (char)'\0' );                                                                        // CFA malloc, type safe
     51    (void *)malloc( (char)'\0' );                                                                       // CFA malloc, type safe
     52#if 0
    4053        printf( "here3\n" );
    4154    p = malloc( p, 1000 );                                                              // CFA remalloc, type safe
     
    6073        printf( "here9\n" );
    6174    free( p );
    62 #if 0
     75
    6376    float * fp = malloc() + 1;
    6477    fprintf( stderr, "%p %p\n", fp, fp - 1 );
  • src/examples/includes.c

    r1b5c81ed rf80e0218  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 23:28:02 2016
    13 // Update Count     : 328
     12// Last Modified On : Wed Apr 13 22:30:02 2016
     13// Update Count     : 370
    1414//
    1515
     
    2424#if 1
    2525#define _GNU_SOURCE
    26 #include <aio.h>
    27 #include <a.out.h>
    28 #include <aliases.h>
    29 #include <alloca.h>
    30 #include <ansidecl.h>
    31 #include <ar.h>
    32 #include <argp.h>
     26//#include <aio.h>
     27//#include <a.out.h>
     28//#include <aliases.h>
     29//#include <alloca.h>
     30//#include <ansidecl.h>
     31//#include <ar.h>
     32//#include <argp.h>
    3333#include <argz.h>
    34 #include <assert.h>
     34//#include <assert.h>
    3535#include <bfd.h>
     36#if 0
    3637#include <bfdlink.h>
    3738#include <byteswap.h>
     
    5657#include <err.h>
    5758#include <errno.h>
    58 #if 0
    5959#include <error.h>
    60 #endif
    6160#include <eti.h>
    6261#include <evdns.h>
    6362#include <event.h>
    6463#include <evhttp.h>
     64#endif
    6565#if 0
    6666#include <evrpc.h>
     
    129129
    130130//#define _GNU_SOURCE
    131 #include <error.h>
     131#include <bfd.h>
     132//#include <error.h>
    132133
    133134#endif // 0
  • src/examples/sum.c

    r1b5c81ed rf80e0218  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // sum.c --
     7// sum.c -- test resolvers ability to deal with many variables with the same name and to use the minimum number of casts
     8//    necessary to disambiguate overloaded variable names.
    89//
    910// Author           : Peter A. Buhr
    1011// Created On       : Wed May 27 17:56:53 2015
    1112// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar  4 15:06:47 2016
    13 // Update Count     : 196
     13// Last Modified On : Thu May 26 09:25:42 2016
     14// Update Count     : 201
    1415//
    1516
     
    4849        } // for
    4950        sout | "sum from" | low | "to" | High | "is"
    50                  | (int)sum( size, a ) | "" | ", check" | (int)s | endl;
     51                 | (int)sum( size, a ) | ", check" | (int)s | endl;
    5152
    5253        int s = 0, a[size], v = low;
     
    5657        } // for
    5758        sout | "sum from" | low | "to" | High | "is"
    58                  | sum( size, (int *)a ) | "" | ", check" | (int)s | endl;
     59                 | sum( size, (int *)a ) | ", check" | (int)s | endl;
    5960
    6061        float s = 0.0, a[size], v = low / 10.0;
     
    6465        } // for
    6566        sout | "sum from" | low / 10.0 | "to" | High / 10.0 | "is"
    66                  | sum( size, (float *)a ) | "" | ", check" | (float)s | endl;
     67                 | sum( size, (float *)a ) | ", check" | (float)s | endl;
    6768
    6869        double s = 0, a[size], v = low / 10.0;
     
    7273        } // for
    7374        sout | "sum from" | low / 10.0 | "to" | High / 10.0 | "is"
    74                  | sum( size, (double *)a ) | "" | ", check" | (double)s | endl;
     75                 | sum( size, (double *)a ) | ", check" | (double)s | endl;
    7576
    7677        struct S { int i, j; } 0 = { 0, 0 }, 1 = { 1, 1 };
    77         S ?+?( S t1, S t2 ) { S s = { t1.i + t2.i, t1.j + t2.j }; return s; }
     78        S ?+?( S t1, S t2 ) { return (S){ t1.i + t2.i, t1.j + t2.j }; }
    7879        S ?+=?( S *t1, S t2 ) { *t1 = *t1 + t2; return *t1; }
    7980        S ++?( S *t ) { *t += 1; return *t; }
     
    8788        } // for
    8889        sout | "sum from" | low | "to" | High | "is"
    89                  | sum( size, (S *)a ) | "" | ", check" | (S)s | endl;
     90                 | sum( size, (S *)a ) | ", check" | (S)s | endl;
    9091} // main
    9192
Note: See TracChangeset for help on using the changeset viewer.