Changeset adb6b30f
- Timestamp:
- Aug 16, 2018, 9:35:06 AM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 0c1d240
- Parents:
- 3de9135
- Location:
- tests
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/examples/boundedBufferEXT.c
r3de9135 radb6b30f 8 8 // Created On : Wed Apr 18 22:52:12 2018 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Wed May 2 16:12:58201811 // Update Count : 710 // Last Modified On : Thu Aug 16 08:17:03 2018 11 // Update Count : 8 12 12 // 13 13 … … 73 73 void main( Consumer & cons ) with( cons ) { 74 74 sum = 0; 75 for ( ;;) {75 for () { 76 76 yield( random( 5 ) ); 77 77 int item = remove( buffer ); -
tests/concurrent/examples/boundedBufferINT.c
r3de9135 radb6b30f 8 8 // Created On : Mon Oct 30 12:45:13 2017 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Thu A pr 26 23:08:17201811 // Update Count : 8 210 // Last Modified On : Thu Aug 16 08:17:58 2018 11 // Update Count : 83 12 12 // 13 13 … … 74 74 void main( Consumer & cons ) with( cons ) { 75 75 sum = 0; 76 for ( ;;) {76 for () { 77 77 yield( random( 5 ) ); 78 78 int item = remove( buffer ); -
tests/concurrent/examples/quickSort.c
r3de9135 radb6b30f 9 9 // Created On : Wed Dec 6 12:15:52 2017 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : T ue Jan 30 15:58:58201812 // Update Count : 16 211 // Last Modified On : Thu Aug 16 08:17:41 2018 12 // Update Count : 163 13 13 // 14 14 … … 131 131 132 132 if ( &unsortedfile ) { // generate output ? 133 for ( ;;) {133 for () { 134 134 unsortedfile | size; // read number of elements in the list 135 135 if ( eof( unsortedfile ) ) break; -
tests/coroutine/fibonacci.c
r3de9135 radb6b30f 11 11 // Created On : Thu Jun 8 07:29:37 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Fri Apr 27 08:55:31201814 // Update Count : 1913 // Last Modified On : Thu Aug 16 08:18:16 2018 14 // Update Count : 20 15 15 // 16 16 … … 26 26 fn = 1; fn2 = fn1; fn1 = fn; // 2nd case 27 27 suspend(); // restart last resume 28 for ( ;;) {28 for () { 29 29 fn = fn1 + fn2; fn2 = fn1; fn1 = fn; // general case 30 30 suspend(); // restart last resume -
tests/coroutine/fmtLines.c
r3de9135 radb6b30f 10 10 // Created On : Sun Sep 17 21:56:15 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue May 15 12:25:33201813 // Update Count : 4 212 // Last Modified On : Thu Aug 16 08:20:54 2018 13 // Update Count : 45 14 14 // 15 15 … … 23 23 24 24 void main( Format & fmt ) with( fmt ) { 25 for ( ;; ) {// for as many characters26 for ( g = 0; g < 5; g += 1 ) {// groups of 5 blocks27 for ( b = 0; b < 4; b += 1 ) {// blocks of 4 characters28 for ( ;; ) {// for newline characters25 for () { // for as many characters 26 for ( g; 5 ) { // groups of 5 blocks 27 for ( b; 4 ) { // blocks of 4 characters 28 for () { // for newline characters 29 29 suspend(); 30 30 if ( ch != '\n' ) break; // ignore newline … … 53 53 Format fmt; 54 54 55 eof: for ( ;; ) {// read until end of file55 eof: for () { // read until end of file 56 56 sin | fmt.ch; // read one character 57 57 if ( eof( sin ) ) break eof; // eof ? -
tests/coroutine/runningTotal.c
r3de9135 radb6b30f 10 10 // Created On : Wed Dec 6 08:05:27 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 6 08:09:24 201713 // Update Count : 212 // Last Modified On : Thu Aug 16 08:22:29 2018 13 // Update Count : 3 14 14 // 15 15 … … 29 29 30 30 void main( RunTotal & rntl ) with( rntl ) { 31 for ( ;;) {31 for () { 32 32 update( rntl, input ); 33 33 } // for … … 41 41 int main() { 42 42 RunTotal rntl; 43 for ( i nt i = 0; i < 10; i += 1) {43 for ( i; 10 ) { 44 44 sout | i | add( rntl, i ) | endl; 45 45 } // for -
tests/fallthrough.c
r3de9135 radb6b30f 10 10 // Created On : Wed Mar 14 10:06:25 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 14 22:45:13201813 // Update Count : 1 312 // Last Modified On : Thu Aug 16 08:21:46 2018 13 // Update Count : 14 14 14 // 15 15 … … 92 92 choose ( 3 ) { 93 93 case 2: 94 for ( ;;) {94 for () { 95 95 choose ( 2 ) { 96 96 case 1: -
tests/labelledExit.c
r3de9135 radb6b30f 10 10 // Created On : Wed Aug 10 07:29:39 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 10 07:30:15 201613 // Update Count : 112 // Last Modified On : Thu Aug 16 08:55:39 2018 13 // Update Count : 3 14 14 // 15 15 … … 60 60 } 61 61 62 D: for ( ;;) {62 D: for () { 63 63 break D; 64 64 continue D; … … 67 67 Z : i += 1; 68 68 goto Z; 69 X: Y: for ( ;;) {69 X: Y: for () { 70 70 i += 1; 71 71 if ( i > 5 ) continue X; … … 74 74 break; 75 75 } 76 XX: for ( ;;) {77 YY: for ( ;;) {78 ZZ: for ( ;;) {76 XX: for () { 77 YY: for () { 78 ZZ: for () { 79 79 i += 1; 80 80 if ( i > 5 ) continue XX; … … 89 89 } 90 90 91 for ( ;;) ;91 for () ; 92 92 for ( int i = 0 ;; ) ; 93 93 for ( ; i < 0; ) ; … … 97 97 L20: L21: L22: L23: L24: L25: L26: L27: L28: L29: 98 98 L31: L32: L33: L34: 99 for ( ;;) {99 for () { 100 100 break L0; 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.