Ignore:
Timestamp:
Apr 15, 2017, 7:09:59 PM (4 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
c57d1935
Parents:
308880c
Message:

Minor cleanup, also filled in benchmark source appendix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/cfa-stack.c

    r308880c ra381b46  
    77};
    88
    9 forall(otype T) void ?{}(stack(T)* s) {
    10         (&s->head){ 0 };
    11 }
    12 
    13 forall(otype T) void copy(stack(T)* s, stack(T)* t) {
    14         stack_node(T)** crnt = &s->head;
    15         stack_node(T)* next = t->head;
    16         while ( next ) {
    17                 *crnt = ((stack_node(T)*)malloc()){ next->value }; /***/
    18                 stack_node(T)* acrnt = *crnt;
    19                 crnt = &acrnt->next;
    20                 next = next->next;
    21         }
    22         *crnt = 0;
    23 }
     9forall(otype T) void ?{}(stack(T)* s) { (&s->head){ 0 }; }
    2410
    2511forall(otype T) void ?{}(stack(T)* s, stack(T) t) {
     
    4228}
    4329
    44 forall(otype T) void ^?{}(stack(T)* s) {
    45         clear(s);
    46 }
     30forall(otype T) void ^?{}(stack(T)* s) { clear(s); }
    4731
    48 forall(otype T) _Bool empty(const stack(T)* s) {
    49         return s->head == 0;
    50 }
     32forall(otype T) _Bool empty(const stack(T)* s) { return s->head == 0; }
    5133
    5234forall(otype T) void push(stack(T)* s, T value) {
Note: See TracChangeset for help on using the changeset viewer.