Ignore:
Timestamp:
Mar 9, 2018, 9:30:47 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
8b001bd
Parents:
29db723
Message:

more updates

File:
1 edited

Legend:

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

    r29db723 r81e8ab0  
    1717        }
    1818        *crnt = 0;
     19}
     20
     21forall( otype T ) void clear( stack(T) & s ) with( s ) {
     22        for ( stack_node(T) * next = head; next; ) {
     23                stack_node(T) * crnt = next;
     24                next = crnt->next;
     25                ^(*crnt){};
     26                free(crnt);
     27        }
     28        head = 0;
    1929}
    2030
     
    4454        return v;
    4555}
    46 
    47 forall( otype T ) void clear( stack(T) & s ) with( s ) {
    48         for ( stack_node(T) * next = head; next; ) {
    49                 stack_node(T) * crnt = next;
    50                 next = crnt->next;
    51                 ^(*crnt){};
    52                 free(crnt);
    53         }
    54         head = 0;
    55 }
Note: See TracChangeset for help on using the changeset viewer.