Changeset b5563e1 for src/tests


Ignore:
Timestamp:
Mar 27, 2018, 10:21:32 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
3d2b7bc
Parents:
a9b1b0c (diff), af1ed1ad (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/coroutine/fibonacci.c

    ra9b1b0c rb5563e1  
    1010// Created On       : Thu Jun  8 07:29:37 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  5 22:27:54 2017
    13 // Update Count     : 14
     12// Last Modified On : Thu Mar 22 22:45:44 2018
     13// Update Count     : 15
    1414//
    1515
     
    2121void ?{}( Fibonacci & fib ) with( fib ) { fn = 0; }
    2222
     23// main automatically called on first resume
    2324void main( Fibonacci & fib ) with( fib ) {
    2425        int fn1, fn2;                                                                           // retained between resumes
    25 
    26         fn = 0; fn1 = fn;                                                                       // 1st case
     26        fn = 0;  fn1 = fn;                                                                      // 1st case
    2727        suspend();                                                                                      // restart last resume
    28 
    29         fn = 1; fn2 = fn1;  fn1 = fn;                                           // 2nd case
     28        fn = 1;  fn2 = fn1;  fn1 = fn;                                          // 2nd case
    3029        suspend();                                                                                      // restart last resume
    31 
    3230        for ( ;; ) {
    3331                fn = fn1 + fn2; fn2 = fn1;  fn1 = fn;                   // general case
Note: See TracChangeset for help on using the changeset viewer.