Changeset ec7f50a


Ignore:
Timestamp:
Jan 17, 2019, 3:39:33 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
bead1cf
Parents:
bd78797 (diff), 273ff10 (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:
7 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/aaron_moss_PhD/phd/background.tex

    rbd78797 rec7f50a  
    213213The ability of types to begin or cease to satisfy traits when declarations go into or out of scope makes caching of trait satisfaction judgements difficult, and the ability of traits to take multiple type parameters can lead to a combinatorial explosion of work in any attempt to pre-compute trait satisfaction relationships.
    214214
    215 \subsection{Implicit Conversions}
     215\subsection{Implicit Conversions} \label{implicit-conv-sec}
    216216
    217217In addition to the multiple interpretations of an expression produced by name overloading and polymorphic functions, for backward compatibility \CFA{} must support all of the implicit conversions present in C, producing further candidate interpretations for expressions.
  • doc/theses/aaron_moss_PhD/phd/resolution-heuristics.tex

    rbd78797 rec7f50a  
    22\label{resolution-chap}
    33
    4 Talk about the resolution heuristics. This is the bulk of the thesis.
     4The main task of the \CFACC{} type-checker is \emph{expression resolution}, determining which declarations the identifiers in each expression correspond to.
     5Resolution is a straightforward task in C, as each declaration has a unique identifier, but in \CFA{} the name overloading features discussed in Section~\ref{overloading-sec} generate multiple candidate declarations for each identifier.
     6I refer to a given matching between identifiers and declarations in an expression as an \emph{interpretation}; an interpretation also includes information about polymorphic type bindings and implicit casts to support the \CFA{} features discussed in Sections~\ref{poly-func-sec} and~\ref{implicit-conv-sec}, each of which increase the proportion of feasible candidate interpretations.
     7To choose between feasible interpretations, \CFA{} defines a \emph{conversion cost} to rank interpretations; the expression resolution problem is thus to find the unique minimal-cost interpretation for an expression, reporting an error if no such interpretation exists.
     8
     9\section{Conversion Cost}
     10
     11
    512
    613% Discuss changes to cost model, as promised in Ch. 2
     14
     15% Mention relevance of work to C++20 concepts
  • driver/cfa.cc

    rbd78797 rec7f50a  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 14 23:02:59 2018
    13 // Update Count     : 277
     12// Last Modified On : Tue Jan 15 20:56:03 2019
     13// Update Count     : 280
    1414//
    1515
     
    384384        nargs += 1;
    385385
     386        for ( int i = 0; i < nlibs; i += 1 ) {                          // copy non-user libraries after all user libraries
     387                args[nargs] = libs[i];
     388                nargs += 1;
     389        } // for
     390
    386391        if ( link ) {
    387392                args[nargs] = "-Xlinker";
     
    414419                nargs += 1;
    415420                args[nargs] = "-lrt";
     421                nargs += 1;
     422                args[nargs] = "-lm";
    416423                nargs += 1;
    417424        } // if
     
    498505                args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str();
    499506                nargs += 1;
    500                 args[nargs] = "-lm";
    501                 nargs += 1;
    502507        } else {
    503508                cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
    504509                exit( EXIT_FAILURE );
    505510        } // if
    506 
    507         for ( int i = 0; i < nlibs; i += 1 ) {                          // copy non-user libraries after all user libraries
    508                 args[nargs] = libs[i];
    509                 nargs += 1;
    510         } // for
    511511
    512512        args[nargs] = NULL;                                                                     // terminate with NULL
  • libcfa/src/concurrency/coroutine.cfa

    rbd78797 rec7f50a  
    8383
    8484void ^?{}(coroutine_desc& this) {
    85       if(this.state != Halted) {
     85      if(this.state != Halted && this.state != Start) {
    8686            coroutine_desc * src = TL_GET( this_coroutine );
    8787            coroutine_desc * dst = &this;
  • src/Concurrency/Keywords.cc

    rbd78797 rec7f50a  
    575575
    576576                //in reverse order :
    577                 // monitor_guard_t __guard = { __monitors, #, func };
     577                // monitor_dtor_guard_t __guard = { __monitors, func };
    578578                body->push_front(
    579579                        new DeclStmt( new ObjectDecl(
     
    634634                assert(generic_func);
    635635
    636                 //in reverse order :
     636                // in reverse order :
    637637                // monitor_guard_t __guard = { __monitors, #, func };
    638638                body->push_front(
  • src/Concurrency/Waitfor.cc

    rbd78797 rec7f50a  
    6666void foo() {
    6767        while( true ) {
    68 
    69                 acceptable_t acceptables[3];
    70                 if( a < 1 ) {
    71                         acceptables[0].func = f;
    72                         acceptables[0].mon = a;
    73                 }
    74                 acceptables[1].func = g;
    75                 acceptables[1].mon = a;
    76 
    77                 acceptables[2].func = f;
    78                 acceptables[2].mon = a;
    79                 acceptables[2].is_dtor = true;
    80 
    81                 int ret = waitfor_internal( acceptables, swagl() );
    82 
    83                 switch( ret ) {
    84                         case 0:
    85                         {
    86                                 bar();
     68                {
     69                        acceptable_t acceptables[3];
     70                        if( a < 1 ) {
     71                                acceptables[0].func = f;
     72                                acceptables[0].mon = a;
    8773                        }
    88                         case 1:
    89                         {
    90                                 baz();
     74                        acceptables[1].func = g;
     75                        acceptables[1].mon = a;
     76
     77                        acceptables[2].func = f;
     78                        acceptables[2].mon = a;
     79                        acceptables[2].is_dtor = true;
     80
     81                        int ret = waitfor_internal( acceptables, swagl() );
     82
     83                        switch( ret ) {
     84                                case 0:
     85                                {
     86                                        bar();
     87                                }
     88                                case 1:
     89                                {
     90                                        baz();
     91                                }
     92                                case 2:
     93                                        signal(a);
     94                                        {
     95                                                break;
     96                                        }
    9197                        }
    92                         case 2:
    93                                 signal(a);
    94                                 {
    95                                         break;
    96                                 }
    9798                }
    9899        }
     
    555556                                        new ConstantExpr( Constant::from_ulong( i++ ) ),
    556557                                        {
    557                                                 clause.statement,
    558                                                 new BranchStmt(
    559                                                         "",
    560                                                         BranchStmt::Break
    561                                                 )
     558                                                new CompoundStmt({
     559                                                        clause.statement,
     560                                                        new BranchStmt(
     561                                                                "",
     562                                                                BranchStmt::Break
     563                                                        )
     564                                                })
    562565                                        }
    563566                                )
     
    570573                                        new ConstantExpr( Constant::from_int( -2 ) ),
    571574                                        {
    572                                                 waitfor->timeout.statement,
    573                                                 new BranchStmt(
    574                                                         "",
    575                                                         BranchStmt::Break
    576                                                 )
     575                                                new CompoundStmt({
     576                                                        waitfor->timeout.statement,
     577                                                        new BranchStmt(
     578                                                                "",
     579                                                                BranchStmt::Break
     580                                                        )
     581                                                })
    577582                                        }
    578583                                )
     
    585590                                        new ConstantExpr( Constant::from_int( -1 ) ),
    586591                                        {
    587                                                 waitfor->orelse.statement,
    588                                                 new BranchStmt(
    589                                                         "",
    590                                                         BranchStmt::Break
    591                                                 )
     592                                                new CompoundStmt({
     593                                                        waitfor->orelse.statement,
     594                                                        new BranchStmt(
     595                                                                "",
     596                                                                BranchStmt::Break
     597                                                        )
     598                                                })
    592599                                        }
    593600                                )
  • src/main.cc

    rbd78797 rec7f50a  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun  6 15:51:47 2018
    13 // Update Count     : 498
     12// Last Modified On : Wed Dec 26 08:11:19 2018
     13// Update Count     : 499
    1414//
    1515
     
    371371                        }
    372372                } catch(const std::exception& e) {
    373                         std::cerr << "Unaught Exception \"" << e.what() << "\"\n";
     373                        std::cerr << "Uncaught Exception \"" << e.what() << "\"\n";
    374374                }
    375375                return 1;
Note: See TracChangeset for help on using the changeset viewer.