Changeset d4a60ac


Ignore:
Timestamp:
Mar 25, 2019, 10:07:13 AM (3 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
5b993e0
Parents:
7a8f5246 (diff), e73d449 (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:software/cfa/cfa-cc

Files:
6 added
19 edited
1 moved

Legend:

Unmodified
Added
Removed
  • doc/papers/concurrency/examples/Fib.py

    r7a8f5246 rd4a60ac  
    1 def Fibonacci():
     1def Fib():
    22        fn = 0; fn1 = fn; yield fn  # suspend
    33        fn = 1; fn2 = fn1; fn1 = fn; yield fn
     
    77
    88
    9 f1 = Fibonacci()
    10 f2 = Fibonacci()
     9f1 = Fib()
     10f2 = Fib()
    1111for i in range( 10 ):
    1212        print( next( f1 ), next( f2 ) )  # resume
  • doc/papers/concurrency/examples/FibRefactor.py

    r7a8f5246 rd4a60ac  
    1 def Fibonacci():
     1def Fib():
    22        def Refactor():
    3                 nonlocal fn, fn1, fn2
     3                nonlocal fn, fn1
    44                fn = 0; fn1 = fn
    55                yield fn                                                # suspend
     6
    67        def Refactor2():
    78                nonlocal fn, fn1, fn2
     
    1415                fn = fn1 + fn2; fn2 = fn1; fn1 = fn; yield fn
    1516
    16 f1 = Fibonacci()
    17 f2 = Fibonacci()
     17f1 = Fib()
     18f2 = Fib()
    1819for i in range( 10 ):
    1920        print( next( f1 ), next( f2 ) )         # resume
  • doc/papers/concurrency/examples/Format.cc

    r7a8f5246 rd4a60ac  
    3131// Local Variables: //
    3232// tab-width: 4 //
    33 // fill-column: 120 //
    3433// compile-command: "u++-work -O2 -nodebubg Format.cc" //
    3534// End: //
  • doc/papers/concurrency/examples/Pingpong.py

    r7a8f5246 rd4a60ac  
    1 i = 0
     1def Scheduler
     2try:
     3        yield from ping();
     4        yield from pong();
     5except StopIteration:
     6        print( "Scheduler stop" )
     7
     8
    29def pong():
    3         global i
    410        print( "pong" )
    5         if i < 4:
     11for i in range( 10 ):
     12
    613                yield from ping()
    714        print( "stop pong" )
  • doc/papers/concurrency/examples/ProdCons.cfa

    r7a8f5246 rd4a60ac  
    7373// Local Variables: //
    7474// tab-width: 4 //
    75 // fill-column: 120 //
    76 // compile-command: "cfa ProdCons.c" //
     75// compile-command: "cfa ProdCons.cfa" //
    7776// End: //
  • libcfa/src/heap.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Sep  6 09:01:30 2018
    13 // Update Count     : 513
     12// Last Modified On : Fri Mar 22 13:43:10 2019
     13// Update Count     : 514
    1414//
    1515
     
    10341034// Local Variables: //
    10351035// tab-width: 4 //
    1036 // compile-command: "cfa -nodebug -O2 heap.c" //
     1036// compile-command: "cfa -nodebug -O2 heap.cfa" //
    10371037// End: //
  • tests/concurrent/examples/boundedBufferEXT.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Wed Apr 18 22:52:12 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 20 08:36:45 2019
    13 // Update Count     : 11
     12// Last Modified On : Fri Mar 22 13:41:33 2019
     13// Update Count     : 12
    1414//
    1515
     
    122122// Local Variables: //
    123123// tab-width: 4 //
    124 // compile-command: "cfa boundedBufferEXT.c" //
     124// compile-command: "cfa boundedBufferEXT.cfa" //
    125125// End: //
  • tests/concurrent/examples/boundedBufferINT.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Mon Oct 30 12:45:13 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 20 08:37:24 2019
    13 // Update Count     : 87
     12// Last Modified On : Fri Mar 22 13:41:52 2019
     13// Update Count     : 88
    1414//
    1515
     
    123123// Local Variables: //
    124124// tab-width: 4 //
    125 // compile-command: "cfa boundedBufferINT.c" //
     125// compile-command: "cfa boundedBufferINT.cfa" //
    126126// End: //
  • tests/concurrent/examples/datingService.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Mon Oct 30 12:56:20 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 20 08:37:12 2019
    13 // Update Count     : 30
     12// Last Modified On : Fri Mar 22 13:41:39 2019
     13// Update Count     : 31
    1414//
    1515
     
    112112// Local Variables: //
    113113// tab-width: 4 //
    114 // compile-command: "cfa datingService.c" //
     114// compile-command: "cfa datingService.cfa" //
    115115// End: //
  • tests/concurrent/examples/quickSort.cfa

    r7a8f5246 rd4a60ac  
    1111// Created On       : Wed Dec  6 12:15:52 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Wed Feb 20 08:38:24 2019
    14 // Update Count     : 169
     13// Last Modified On : Fri Mar 22 13:42:01 2019
     14// Update Count     : 170
    1515//
    1616
     
    180180// Local Variables: //
    181181// tab-width: 4 //
    182 // compile-command: "cfa quickSort.c" //
     182// compile-command: "cfa quickSort.cfa" //
    183183// End: //
  • tests/concurrent/waitfor/parse2.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Wed Aug 30 17:53:29 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 30 17:55:17 2017
    13 // Update Count     : 2
     12// Last Modified On : Fri Mar 22 13:42:11 2019
     13// Update Count     : 3
    1414//
    1515
     
    246246// Local Variables: //
    247247// tab-width: 4 //
    248 // compile-command: "cfa waitfor.c" //
     248// compile-command: "cfa waitfor.cfa" //
    249249// End: //
  • tests/coroutine/.expect/fmtLines.txt

    r7a8f5246 rd4a60ac  
    1616difi  ed B  y :   Pete  r A. 
    1717 Buh  r//   Last   Mod  ifie 
    18 d On   : T  ue D  ec 1  1 2
    19 :31:  12 2  018/  / Up  date 
    20  Cou  nt       :   32/  /#in 
     18d On   : F  ri M  ar 2  2 1
     19:41:  03 2  019/  / Up  date 
     20 Cou  nt       :   33/  /#in 
    2121clud  e <f  stre  am.h  fa># 
    2222incl  ude   <cor  outi  ne.h 
     
    7676th:   4 //  // c  ompi  le-c 
    7777omma  nd:   "cfa   fmt  Line 
    78 s.c"   ///  / En  d: /  /
     78s.cf  a" /  ///   End:   //
  • tests/coroutine/.in/fmtLines.txt

    r7a8f5246 rd4a60ac  
    1010// Created On       : Sun Sep 17 21:56:15 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 23:31:12 2018
    13 // Update Count     : 32
     12// Last Modified On : Fri Mar 22 13:41:03 2019
     13// Update Count     : 33
    1414//
    1515
     
    6464// Local Variables: //
    6565// tab-width: 4 //
    66 // compile-command: "cfa fmtLines.c" //
     66// compile-command: "cfa fmtLines.cfa" //
    6767// End: //
  • tests/coroutine/fibonacci.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Thu Jun  8 07:29:37 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 21:57:33 2018
    13 // Update Count     : 25
     12// Last Modified On : Fri Mar 22 13:40:35 2019
     13// Update Count     : 26
    1414//
    1515
     
    4545// Local Variables: //
    4646// tab-width: 4 //
    47 // compile-command: "cfa fibonacci.c" //
     47// compile-command: "cfa fibonacci.cfa" //
    4848// End: //
  • tests/coroutine/fibonacci_1.cfa

    r7a8f5246 rd4a60ac  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // fibonacci_1.c -- 1-state finite-state machine: precomputed first two states returning f(n - 2)
     7// fibonacci_1.cfa -- 1-state finite-state machine: precomputed first two states returning f(n - 1)
    88//
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Apr 26 23:20:08 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 21:57:54 2018
    13 // Update Count     : 14
     12// Last Modified On : Thu Mar 21 08:10:45 2019
     13// Update Count     : 25
    1414//
    1515
     
    1717#include <coroutine.hfa>
    1818
    19 coroutine Fibonacci { int ret; };                                               // used for communication
     19coroutine Fibonacci { int fn1; };                                               // used for communication
    2020
    2121void main( Fibonacci & fib ) with( fib ) {                              // called on first resume
    22         int fn, fn1 = 1, fn2 = 0;                                                       // precompute first two states
     22        int fn;
     23        [fn1, fn] = [0, 1];                                                                     // precompute first two states
    2324        for () {
    24                 ret = fn2;
    25                 fn = fn1 + fn2;  fn2 = fn1;  fn1 = fn;                  // general case
    2625                suspend();                                                                              // restart last resume
     26                [fn1, fn] = [fn, fn1 + fn];                                             // general case
    2727        } // for
    2828}
     
    3030int next( Fibonacci & fib ) with( fib ) {
    3131        resume( fib );                                                                          // restart last suspend
    32         return ret;
     32        return fn1;
    3333}
    3434
     
    4242// Local Variables: //
    4343// tab-width: 4 //
    44 // compile-command: "cfa fibonacci_1.c" //
     44// compile-command: "cfa fibonacci_1.cfa" //
    4545// End: //
  • tests/coroutine/fmtLines.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Sun Sep 17 21:56:15 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec 22 18:27:00 2018
    13 // Update Count     : 57
     12// Last Modified On : Fri Mar 22 13:41:16 2019
     13// Update Count     : 58
    1414//
    1515
     
    6363// Local Variables: //
    6464// tab-width: 4 //
    65 // compile-command: "cfa fmtLines.c" //
     65// compile-command: "cfa fmtLines.cfa" //
    6666// End: //
  • tests/coroutine/pingpong.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Wed Sep 20 11:55:23 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 21:58:06 2018
    13 // Update Count     : 29
     12// Last Modified On : Fri Mar 22 13:37:52 2019
     13// Update Count     : 30
    1414//
    1515
     
    5353// Local Variables: //
    5454// tab-width: 4 //
    55 // compile-command: "cfa pingpong.c" //
     55// compile-command: "cfa pingpong.cfa" //
    5656// End: //
  • tests/coroutine/prodcons.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Mon Sep 18 12:23:39 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec 12 23:04:49 2018
    13 // Update Count     : 53
     12// Last Modified On : Fri Mar 22 13:41:10 2019
     13// Update Count     : 54
    1414//
    1515
     
    9191// Local Variables: //
    9292// tab-width: 4 //
    93 // compile-command: "cfa prodcons.c" //
     93// compile-command: "cfa prodcons.cfa" //
    9494// End: //
  • tests/coroutine/runningTotal.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Wed Dec  6 08:05:27 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 11 21:59:00 2018
    13 // Update Count     : 4
     12// Last Modified On : Fri Mar 22 13:40:49 2019
     13// Update Count     : 5
    1414//
    1515
     
    4848// Local Variables: //
    4949// tab-width: 4 //
    50 // compile-command: "cfa runningTotal.c" //
     50// compile-command: "cfa runningTotal.cfa" //
    5151// End: //
  • tests/raii/init_once.cfa

    r7a8f5246 rd4a60ac  
    1010// Created On       : Tue Jun 14 15:43:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul  9 11:30:29 2016
    13 // Update Count     : 3
     12// Last Modified On : Fri Mar 22 13:41:26 2019
     13// Update Count     : 4
    1414//
    1515
     
    192192// Local Variables: //
    193193// tab-width: 4 //
    194 // compile-command: "cfa init_once.c" //
     194// compile-command: "cfa init_once.cfa" //
    195195// End: //
Note: See TracChangeset for help on using the changeset viewer.