Changes in / [80cdb2f:2f0a3599]


Ignore:
Location:
doc
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • doc/bibliography/cfa.bib

    r80cdb2f r2f0a3599  
    45634563}
    45644564
    4565 @manual{obj-c-book,
    4566     keywords = {objective-c},
    4567     contributor = {a3moss@uwaterloo.ca},
    4568     author = {{Apple Computer Inc.}},
    4569     title = {The {Objective-C} Programming Language},
    4570     publisher = {Apple Computer Inc.},
    4571     address = {Cupertino, CA},
    4572     year = 2003
     4565@book{obj-c-book,
     4566    keywords    = {objective-c},
     4567    contributor = {a3moss@uwaterloo.ca},
     4568    author      = {{Apple Computer Inc.}},
     4569    title       = {The {Objective-C} Programming Language},
     4570    year        = 2002
    45734571}
    45744572
  • doc/generic_types/evaluation/Makefile

    r80cdb2f r2f0a3599  
    1 CFA = my-cfa
    2 DEPFLAGS = -MMD -MP
     1CFA=cfa
    32
    4 .PHONY: all clean distclean bench
     3# %.o : %.cf
     4#       $(CFA) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
    55
    6 all: c-bench cpp-bench cfa-bench c2-bench cpp2-bench cfa2-bench
     6cfa-stack.o: cfa-stack.c cfa-stack.h
     7        $(CFA) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
    78
    8 # rewrite object generation to auto-determine deps
    9 COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS)
    10 COMPILE.cpp = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS)
    11 COMPILE.cfa = $(CFA) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS)
     9c-bench: c-bench.c bench.h c-stack.o
     10        $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< c-stack.o
    1211
    13 c-%.o : c-%.c
    14 c-%.o : c-%.c c-%.d
    15         $(COMPILE.c) -O0 $(OUTPUT_OPTION) -c $<
     12cpp-bench: cpp-bench.cpp bench.h cpp-stack.h
     13        $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
    1614
    17 cpp-%.o : cpp-%.cpp
    18 cpp-%.o : cpp-%.cpp cpp-%.d
    19         $(COMPILE.cpp) -O0 $(OUTPUT_OPTION) -c $<
    20 
    21 cfa-%.o : cfa-%.c
    22 cfa-%.o : cfa-%.c cfa-%.d
    23         $(COMPILE.cfa) -O0 $(OUTPUT_OPTION) -c $<
    24 
    25 c2-%.o : c-%.c
    26 c2-%.o : c-%.c c-%.d
    27         $(COMPILE.c) -O2 $(OUTPUT_OPTION) -c $<
    28 
    29 cpp2-%.o : cpp-%.cpp
    30 cpp2-%.o : cpp-%.cpp cpp-%.d
    31         $(COMPILE.cpp) -O2 $(OUTPUT_OPTION) -c $<
    32 
    33 cfa2-%.o : cfa-%.c
    34 cfa2-%.o : cfa-%.c cfa-%.d
    35         $(COMPILE.cfa) -O2 $(OUTPUT_OPTION) -c $<
    36 
    37 COBJS = c-stack.o
    38 CPPOBJS =
    39 CFAOBJS = cfa-stack.o
    40 C2OBJS = $(patsubst c-%,c2-%, $(COBJS))
    41 CPP2OBJS = $(patsubst cpp-%,cpp2-%, $(CPPOBJS))
    42 CFA2OBJS = $(patsubst cfa-%,cfa2-%, $(CFAOBJS))
    43 
    44 c-bench: c-bench.c c-bench.d $(COBJS)
    45         $(COMPILE.c) -O0 -o $@ $< $(COBJS) $(LDFLAGS)
    46 
    47 cpp-bench: cpp-bench.cpp cpp-bench.d $(CPPOBJS)
    48         $(COMPILE.cpp) -O0 -o $@ $< $(CPPOBJS) $(LDFLAGS)
    49 
    50 cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS)
    51         $(COMPILE.cfa) -O0 -o $@ $< $(CFAOBJS) $(LDFLAGS)
    52 
    53 c2-bench: c-bench.c c-bench.d $(C2OBJS)
    54         $(COMPILE.c) -O2 -o $@ $< $(C2OBJS) $(LDFLAGS)
    55 
    56 cpp2-bench: cpp-bench.cpp cpp-bench.d $(CPP2OBJS)
    57         $(COMPILE.cpp) -O2 -o $@ $< $(CPP2OBJS) $(LDFLAGS)
    58 
    59 cfa2-bench: cfa-bench.c cfa-bench.d $(CFA2OBJS)
    60         $(COMPILE.cfa) -O2 -o $@ $< $(CFA2OBJS) $(LDFLAGS)
     15cfa-bench: cfa-bench.c bench.h cfa-stack.o
     16        $(CFA) $(CFLAGS) $(CPPFLAGS) -o $@ $< cfa-stack.o
    6117
    6218clean:
    63         -rm $(COBJS) c-bench
    64         -rm $(CPPOBJS) cpp-bench
    65         -rm $(CFAOBJS) cfa-bench
    66         -rm $(C2OBJS) c2-bench
    67         -rm $(CPP2OBJS) cpp2-bench
    68         -rm $(CFA2OBJS) cfa2-bench
    69 
    70 distclean: clean
    71         -rm $(COBJS:.o=.d) c-bench.d
    72         -rm $(CPPOBJS:.o=.d) cpp-bench.d
    73         -rm $(CFAOBJS:.o=.d) cfa-bench.d
    74 
    75 bench: c-bench cpp-bench cfa-bench c2-bench cpp2-bench cfa2-bench
    76         @echo '## C ##'
    77         @./c-bench
    78         @echo '## C++ ##'
    79         @./cpp-bench
    80         @echo '## Cforall ##'
    81         @./cfa-bench
    82         @echo '## C -O2 ##'
    83         @./c2-bench
    84         @echo '## C++ -O2 ##'
    85         @./cpp2-bench
    86         @echo '## Cforall -O2 ##'
    87         @./cfa2-bench
    88 
    89 # so make doesn't fail without dependency files
    90 %.d: ;
    91 
    92 # so make won't delete dependency files
    93 .PRECIOUS: %.d
    94 
    95 # include dependency files
    96 -include: $(COBJS:.o=.d)
    97 -include: $(CPPOBJS:.o=.d)
    98 -include: $(CFAOBJS:.o=.d)
    99 -include: c-bench.d
    100 -include: cpp-bench.d
    101 -include: cfa-bench.d
     19        -rm *.o
     20        -rm c-bench
     21        -rm cpp-bench
     22        -rm cfa-bench
  • doc/generic_types/evaluation/cfa-stack.c

    r80cdb2f r2f0a3599  
    88
    99forall(otype T) void ?{}(stack(T)* s) {
    10         ?{}( &s->head, 0 );
     10        ?{}( s->head, 0 );
    1111}
    1212
     
    2525
    2626forall(otype T) void push(stack(T)* s, T value) {
    27         s->head = ((stack_node(T)*)malloc()){ value, s->head };
     27        s->head = new( value, s->head );
    2828}
    2929
Note: See TracChangeset for help on using the changeset viewer.