Changeset adb6b30f


Ignore:
Timestamp:
Aug 16, 2018, 9:35:06 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
0c1d240
Parents:
3de9135
Message:

more forctrl changes

Location:
tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/examples/boundedBufferEXT.c

    r3de9135 radb6b30f  
    88// Created On       : Wed Apr 18 22:52:12 2018
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Wed May  2 16:12:58 2018
    11 // Update Count     : 7
     10// Last Modified On : Thu Aug 16 08:17:03 2018
     11// Update Count     : 8
    1212//
    1313
     
    7373void main( Consumer & cons ) with( cons ) {
    7474        sum = 0;
    75         for ( ;; ) {
     75        for () {
    7676                yield( random( 5 ) );
    7777                int item = remove( buffer );
  • tests/concurrent/examples/boundedBufferINT.c

    r3de9135 radb6b30f  
    88// Created On       : Mon Oct 30 12:45:13 2017
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Thu Apr 26 23:08:17 2018
    11 // Update Count     : 82
     10// Last Modified On : Thu Aug 16 08:17:58 2018
     11// Update Count     : 83
    1212//
    1313
     
    7474void main( Consumer & cons ) with( cons ) {
    7575        sum = 0;
    76         for ( ;; ) {
     76        for () {
    7777                yield( random( 5 ) );
    7878                int item = remove( buffer );
  • tests/concurrent/examples/quickSort.c

    r3de9135 radb6b30f  
    99// Created On       : Wed Dec  6 12:15:52 2017
    1010// Last Modified By : Peter A. Buhr
    11 // Last Modified On : Tue Jan 30 15:58:58 2018
    12 // Update Count     : 162
     11// Last Modified On : Thu Aug 16 08:17:41 2018
     12// Update Count     : 163
    1313//
    1414
     
    131131
    132132        if ( &unsortedfile ) {                                                          // generate output ?
    133                 for ( ;; ) {
     133                for () {
    134134                        unsortedfile | size;                                            // read number of elements in the list
    135135                  if ( eof( unsortedfile ) ) break;
  • tests/coroutine/fibonacci.c

    r3de9135 radb6b30f  
    1111// Created On       : Thu Jun  8 07:29:37 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Fri Apr 27 08:55:31 2018
    14 // Update Count     : 19
     13// Last Modified On : Thu Aug 16 08:18:16 2018
     14// Update Count     : 20
    1515//
    1616
     
    2626        fn = 1;  fn2 = fn1;  fn1 = fn;                                          // 2nd case
    2727        suspend();                                                                                      // restart last resume
    28         for ( ;; ) {
     28        for () {
    2929                fn = fn1 + fn2;  fn2 = fn1;  fn1 = fn;                  // general case
    3030                suspend();                                                                              // restart last resume
  • tests/coroutine/fmtLines.c

    r3de9135 radb6b30f  
    1010// Created On       : Sun Sep 17 21:56:15 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 15 12:25:33 2018
    13 // Update Count     : 42
     12// Last Modified On : Thu Aug 16 08:20:54 2018
     13// Update Count     : 45
    1414//
    1515
     
    2323
    2424void main( Format & fmt ) with( fmt ) {
    25         for ( ;; ) {                                                                            // for as many characters
    26                 for ( g = 0; g < 5; g += 1 ) {                                  // groups of 5 blocks
    27                         for ( b = 0; b < 4; b += 1 ) {                          // blocks of 4 characters
    28                                 for ( ;; ) {                                                    // for newline characters
     25        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
    2929                                        suspend();
    3030                                        if ( ch != '\n' ) break;                        // ignore newline
     
    5353        Format fmt;
    5454
    55         eof: for ( ;; ) {                                                                       // read until end of file
     55  eof: for () {                                                                                 // read until end of file
    5656                sin | fmt.ch;                                                                   // read one character
    5757          if ( eof( sin ) ) break eof;                                          // eof ?
  • tests/coroutine/runningTotal.c

    r3de9135 radb6b30f  
    1010// Created On       : Wed Dec  6 08:05:27 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec  6 08:09:24 2017
    13 // Update Count     : 2
     12// Last Modified On : Thu Aug 16 08:22:29 2018
     13// Update Count     : 3
    1414//
    1515
     
    2929
    3030void main( RunTotal & rntl ) with( rntl ) {
    31         for ( ;; ) {
     31        for () {
    3232                update( rntl, input );
    3333        } // for
     
    4141int main() {
    4242        RunTotal rntl;
    43         for ( int i = 0; i < 10; i += 1 ) {
     43        for ( i; 10 ) {
    4444                sout | i | add( rntl, i ) | endl;
    4545        } // for
  • tests/fallthrough.c

    r3de9135 radb6b30f  
    1010// Created On       : Wed Mar 14 10:06:25 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar 14 22:45:13 2018
    13 // Update Count     : 13
     12// Last Modified On : Thu Aug 16 08:21:46 2018
     13// Update Count     : 14
    1414//
    1515
     
    9292        choose ( 3 ) {
    9393                case 2:
    94                         for ( ;; ) {
     94                        for () {
    9595                                choose ( 2 ) {
    9696                                        case 1:
  • tests/labelledExit.c

    r3de9135 radb6b30f  
    1010// Created On       : Wed Aug 10 07:29:39 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 10 07:30:15 2016
    13 // Update Count     : 1
     12// Last Modified On : Thu Aug 16 08:55:39 2018
     13// Update Count     : 3
    1414//
    1515
     
    6060        }
    6161
    62   D: for ( ;; ) {
     62  D: for () {
    6363                break D;
    6464                continue D;
     
    6767  Z : i += 1;
    6868        goto Z;
    69   X: Y: for ( ;; ) {
     69  X: Y: for () {
    7070                i += 1;
    7171                if ( i > 5 ) continue X;
     
    7474                break;
    7575        }
    76   XX: for ( ;; ) {
    77           YY: for ( ;; ) {
    78                   ZZ: for ( ;; ) {
     76  XX: for () {
     77          YY: for () {
     78                  ZZ: for () {
    7979                                i += 1;
    8080                                if ( i > 5 ) continue XX;
     
    8989        }
    9090
    91         for ( ;; ) ;
     91        for () ;
    9292        for ( int i = 0 ;; ) ;
    9393        for (  ; i < 0; ) ;
     
    9797  L20: L21: L22: L23: L24: L25: L26: L27: L28: L29:
    9898  L31: L32: L33: L34:
    99         for ( ;; ) {
     99        for () {
    100100                break L0;
    101101        }
Note: See TracChangeset for help on using the changeset viewer.