Changeset 19de7864 for libcfa/src/bits
- Timestamp:
- Dec 17, 2020, 12:28:03 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7522692
- Parents:
- 28e88d7
- Location:
- libcfa/src/bits
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/bits/collection.hfa ¶
r28e88d7 r19de7864 35 35 // return (T *)Next( (Colable *)n ); 36 36 // } 37 38 // bool listed( T * n ) {39 // return Next( (Colable *)n ) != 0p;40 // }41 37 // } // distribution 42 38 } // distribution 43 39 40 forall( dtype T | { T *& Next ( T * ); } ) { 41 bool listed( T * n ) { 42 return Next( n ) != 0p; 43 } 44 } 44 45 45 46 struct Collection { -
TabularUnified libcfa/src/bits/queue.hfa ¶
r28e88d7 r19de7864 3 3 #include "bits/collection.hfa" 4 4 5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {5 forall( dtype T | { T *& Next ( T * ); } ) { 6 6 struct Queue { 7 7 inline Collection; // Plan 9 inheritance … … 142 142 } // distribution 143 143 144 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {144 forall( dtype T | { T *& Next ( T * ); } ) { 145 145 struct QueueIter { 146 146 inline ColIter; // Plan 9 inheritance -
TabularUnified libcfa/src/bits/sequence.hfa ¶
r28e88d7 r19de7864 36 36 } // distribution 37 37 38 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * );} ) {38 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) { 39 39 struct Sequence { 40 40 inline Collection; // Plan 9 inheritance … … 216 216 } // distribution 217 217 218 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * );} ) {218 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) { 219 219 // SeqIter(T) is used to iterate over a Sequence(T) in head-to-tail order. 220 220 struct SeqIter { -
TabularUnified libcfa/src/bits/stack.hfa ¶
r28e88d7 r19de7864 3 3 #include "bits/collection.hfa" 4 4 5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {5 forall( dtype T | { T *& Next ( T * ); } ) { 6 6 struct Stack { 7 7 inline Collection; // Plan 9 inheritance … … 58 58 59 59 60 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {60 forall( dtype T | { T *& Next ( T * ); } ) { 61 61 struct StackIter { 62 62 inline ColIter; // Plan 9 inheritance
Note: See TracChangeset
for help on using the changeset viewer.