Changeset 1518b39 for doc/papers/general/evaluation/cfa-stack.c
- Timestamp:
- May 1, 2018, 2:43:15 PM (8 years ago)
- 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, with_gc
- Children:
- 5da5a96
- Parents:
- b9c432f (diff), 4c80a75 (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. - File:
-
- 1 edited
-
doc/papers/general/evaluation/cfa-stack.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/general/evaluation/cfa-stack.c
rb9c432f r1518b39 8 8 }; 9 9 10 void ?{}( stack(T) & s ) { (s.head){ 0 }; } 11 12 void ?{}( stack(T) & s, stack(T) t ) { 10 void ?{}( stack(T) & s, stack(T) t ) { // copy 13 11 node(T) ** cr = &s.head; 14 12 for ( node(T) * nx = t.head; nx; nx = nx->next ) { … … 20 18 } 21 19 22 void ^?{}( stack(T) & s) { clear( s ); } 23 24 void clear( stack(T) & s ) with( s ) { 20 void clear( stack(T) & s ) with( s ) { 25 21 for ( node(T) * nx = head; nx; ) { 26 22 node(T) * cr = nx; 27 23 nx = cr->next; 28 24 ^(*cr){}; 29 free( cr);25 free( cr ); 30 26 } 31 27 head = 0; 32 28 } 29 30 void ?{}( stack(T) & s ) { (s.head){ 0 }; } 31 void ^?{}( stack(T) & s) { clear( s ); } 33 32 34 33 stack(T) ?=?( stack(T) & s, stack(T) t ) { … … 39 38 } 40 39 41 _Bool empty( const stack(T) & s ) { return s.head == 0; } 40 _Bool empty( const stack(T) & s ) { 41 return s.head == 0; 42 } 42 43 43 44 void push( stack(T) & s, T value ) with( s ) {
Note:
See TracChangeset
for help on using the changeset viewer.