Changeset fbcb354 for src


Ignore:
Timestamp:
Aug 31, 2017, 3:33:11 PM (8 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, resolv-new, with_gc
Children:
058f549
Parents:
326338ae (diff), 2ad507b8 (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

Location:
src
Files:
3 added
23 edited

Legend:

Unmodified
Added
Removed
  • src/Common/CodeLocation.h

    r326338ae rfbcb354  
    99// Author           : Andrew Beach
    1010// Created On       : Thr Aug 17 11:23:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Aug 17 14:07:00 2017
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Aug 28 12:46:01 2017
     13// Update Count     : 2
    1414//
    1515
     
    6666
    6767inline std::string to_string( const CodeLocation& location ) {
    68     return location.isSet() ? location.filename + ":" + std::to_string(location.linenumber) + " " : "";
     68    // Column number ":1" allows IDEs to parse the error message and position the cursor in the source text.
     69    return location.isSet() ? location.filename + ":" + std::to_string(location.linenumber) + ":1 " : "";
    6970}
    7071
  • src/Common/PassVisitor.h

    r326338ae rfbcb354  
    7575        virtual void visit( CatchStmt *catchStmt ) override final;
    7676        virtual void visit( FinallyStmt *finallyStmt ) override final;
     77        virtual void visit( WaitForStmt *waitforStmt ) override final;
    7778        virtual void visit( NullStmt *nullStmt ) override final;
    7879        virtual void visit( DeclStmt *declStmt ) override final;
     
    159160        virtual Statement* mutate( ReturnStmt *returnStmt ) override final;
    160161        virtual Statement* mutate( ThrowStmt *throwStmt ) override final;
    161         virtual Statement* mutate( TryStmt *returnStmt ) override final;
     162        virtual Statement* mutate( TryStmt *tryStmt ) override final;
    162163        virtual Statement* mutate( CatchStmt *catchStmt ) override final;
    163         virtual Statement* mutate( FinallyStmt *catchStmt ) override final;
     164        virtual Statement* mutate( FinallyStmt *finallyStmt ) override final;
     165        virtual Statement* mutate( WaitForStmt *waitforStmt ) override final;
    164166        virtual NullStmt* mutate( NullStmt *nullStmt ) override final;
    165167        virtual Statement* mutate( DeclStmt *declStmt ) override final;
  • src/Common/PassVisitor.impl.h

    r326338ae rfbcb354  
    541541}
    542542
     543//--------------------------------------------------------------------------
     544// FinallyStmt
    543545template< typename pass_type >
    544546void PassVisitor< pass_type >::visit( FinallyStmt * node ) {
     
    547549
    548550template< typename pass_type >
     551Statement * PassVisitor< pass_type >::mutate( FinallyStmt * node ) {
     552        MUTATE_BODY( Statement, node );
     553}
     554
     555//--------------------------------------------------------------------------
     556// WaitForStmt
     557template< typename pass_type >
     558void PassVisitor< pass_type >::visit( WaitForStmt * node ) {
     559        VISIT_BODY( node );
     560}
     561
     562template< typename pass_type >
     563Statement * PassVisitor< pass_type >::mutate( WaitForStmt * node ) {
     564        MUTATE_BODY( Statement, node );
     565}
     566
     567//--------------------------------------------------------------------------
     568// NullStmt
     569template< typename pass_type >
    549570void PassVisitor< pass_type >::visit( NullStmt * node ) {
    550571        VISIT_BODY( node );
     
    552573
    553574template< typename pass_type >
     575NullStmt * PassVisitor< pass_type >::mutate( NullStmt * node ) {
     576        MUTATE_BODY( NullStmt, node );
     577}
     578
     579//--------------------------------------------------------------------------
     580// DeclStmt
     581template< typename pass_type >
    554582void PassVisitor< pass_type >::visit( DeclStmt * node ) {
    555583        VISIT_BODY( node );
     
    557585
    558586template< typename pass_type >
     587Statement * PassVisitor< pass_type >::mutate( DeclStmt * node ) {
     588        MUTATE_BODY( Statement, node );
     589}
     590
     591//--------------------------------------------------------------------------
     592// ImplicitCtorDtorStmt
     593template< typename pass_type >
    559594void PassVisitor< pass_type >::visit( ImplicitCtorDtorStmt * node ) {
    560595        VISIT_BODY( node );
     
    562597
    563598template< typename pass_type >
     599Statement * PassVisitor< pass_type >::mutate( ImplicitCtorDtorStmt * node ) {
     600        MUTATE_BODY( Statement, node );
     601}
     602
     603//--------------------------------------------------------------------------
     604// ApplicationExpr
     605template< typename pass_type >
    564606void PassVisitor< pass_type >::visit( ApplicationExpr * node ) {
    565607        VISIT_BODY( node );
     608}
     609
     610template< typename pass_type >
     611Expression * PassVisitor< pass_type >::mutate( ApplicationExpr * node ) {
     612        MUTATE_BODY( Expression, node );
    566613}
    567614
     
    944991
    945992template< typename pass_type >
    946 Statement * PassVisitor< pass_type >::mutate( FinallyStmt * node ) {
    947         MUTATE_BODY( Statement, node );
    948 }
    949 
    950 template< typename pass_type >
    951 NullStmt * PassVisitor< pass_type >::mutate( NullStmt * node ) {
    952         MUTATE_BODY( NullStmt, node );
    953 }
    954 
    955 template< typename pass_type >
    956 Statement * PassVisitor< pass_type >::mutate( DeclStmt * node ) {
    957         MUTATE_BODY( Statement, node );
    958 }
    959 
    960 template< typename pass_type >
    961 Statement * PassVisitor< pass_type >::mutate( ImplicitCtorDtorStmt * node ) {
    962         MUTATE_BODY( Statement, node );
    963 }
    964 
    965 template< typename pass_type >
    966 Expression * PassVisitor< pass_type >::mutate( ApplicationExpr * node ) {
    967         MUTATE_BODY( Expression, node );
    968 }
    969 
    970 template< typename pass_type >
    971993Expression * PassVisitor< pass_type >::mutate( NameExpr * node ) {
    972994        MUTATE_BODY( Expression, node );
  • src/Common/SemanticError.cc

    r326338ae rfbcb354  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:21:25 2015
    13 // Update Count     : 1
     12// Last Modified On : Tue Aug 29 18:17:35 2017
     13// Update Count     : 3
    1414//
    1515
    16 #include <cstdio>            // for fileno, stderr
    17 #include <unistd.h>          // for isatty
    18 #include <iostream>          // for basic_ostream, operator<<, ostream
    19 #include <list>              // for list, _List_iterator
    20 #include <string>            // for string, operator<<, operator+, to_string
     16#include <cstdio>                                                                               // for fileno, stderr
     17#include <unistd.h>                                                                             // for isatty
     18#include <iostream>                                                                             // for basic_ostream, operator<<, ostream
     19#include <list>                                                                                 // for list, _List_iterator
     20#include <string>                                                                               // for string, operator<<, operator+, to_string
    2121
    22 #include "Common/utility.h"  // for to_string, CodeLocation (ptr only)
     22#include "Common/utility.h"                                                             // for to_string, CodeLocation (ptr only)
    2323#include "SemanticError.h"
    24 
    25 inline const std::string& error_str() {
    26         static std::string str = isatty( fileno(stderr) ) ? "\e[31merror:\e[39m " : "error: ";
    27         return str;
    28 }
    2924
    3025SemanticError::SemanticError() {
     
    4944void SemanticError::print( std::ostream &os ) {
    5045        using std::to_string;
    51         for(auto err : errors) {
    52                 os << to_string( err.location ) << err.description << '\n';
     46        for( auto err : errors ) {
     47                os << to_string( err.location ) << err.description << std::endl;
    5348        }
    5449}
  • src/Common/SemanticError.h

    r326338ae rfbcb354  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Aug 17 14:01:00 2017
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Aug 29 22:03:36 2017
     13// Update Count     : 17
    1414//
    1515
    1616#pragma once
    1717
    18 #include <exception>  // for exception
    19 #include <iostream>   // for ostream
    20 #include <list>       // for list
    21 #include <string>     // for string
     18#include <exception>                                                                    // for exception
     19#include <iostream>                                                                             // for ostream
     20#include <list>                                                                                 // for list
     21#include <string>                                                                               // for string
     22#include <unistd.h>                                                                             // for isatty
    2223
    23 #include "CodeLocation.h"  // for CodeLocation, toString
     24#include "CodeLocation.h"                                                               // for CodeLocation, toString
    2425
    2526struct error {
     
    2829
    2930        error() = default;
    30         error( const std::string& str ) : description( str ) {}
     31        error( const std::string & str ) : description( str ) {}
    3132
    32         void maybeSet( const CodeLocation& location ) {
     33        void maybeSet( const CodeLocation & location ) {
    3334                if( this->location.linenumber < 0 ) {
    3435                        this->location = location;
     
    4142        SemanticError();
    4243        SemanticError( std::string error );
    43         template< typename T > SemanticError( const std::string &error, const T *obj );
     44        template< typename T > SemanticError( const std::string & error, const T * obj );
    4445        ~SemanticError() throw() {}
    4546
    46         void append( SemanticError &other );
     47        static inline const std::string & error_str() {
     48                static std::string str = isatty( STDERR_FILENO ) ? "\e[31merror:\e[39m " : "error: ";
     49                return str;
     50        }
     51
     52        void append( SemanticError & other );
    4753        void append( const std::string & );
    4854        bool isEmpty() const;
    49         void print( std::ostream &os );
     55        void print( std::ostream & os );
    5056
    51         void set_location( const CodeLocation& location );
    52         // constructs an exception using the given message and the printed
    53         // representation of the obj (T must have a print method)
     57        void set_location( const CodeLocation & location );
     58        // constructs an exception using the given message and the printed representation of the obj (T must have a print
     59        // method)
    5460  private:
    5561        std::list< error > errors;
     
    5763
    5864template< typename T >
    59 SemanticError::SemanticError( const std::string &error, const T *obj ) {
     65SemanticError::SemanticError( const std::string & error, const T * obj ) {
    6066        append( toString( error, obj ) );
    6167}
  • src/Concurrency/Keywords.cc

    r326338ae rfbcb354  
    1919#include <string>                  // for string, operator==
    2020
     21#include "Common/PassVisitor.h"    // for PassVisitor
    2122#include "Common/SemanticError.h"  // for SemanticError
    2223#include "Common/utility.h"        // for deleteAll, map_range
     
    4647
    4748        //=============================================================================================
    48         // Visitors declaration
     49        // Pass declarations
    4950        //=============================================================================================
    5051
     
    5859        //                                           static inline NewField_t * getter_name( MyType * this ) { return &this->newField; }
    5960        //
    60         class ConcurrentSueKeyword : public Visitor {
    61           protected:
    62             template< typename Visitor >
    63             friend void SymTab::acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor );
     61        class ConcurrentSueKeyword : public WithDeclsToAdd {
    6462          public:
    6563
     
    6967                virtual ~ConcurrentSueKeyword() {}
    7068
    71                 using Visitor::visit;
    72                 virtual void visit( StructDecl * decl ) override final;
     69                void postvisit( StructDecl * decl );
    7370
    7471                void handle( StructDecl * );
     
    8683                bool needs_main;
    8784
    88                 std::list< Declaration * > declsToAdd, declsToAddAfter;
    8985                StructDecl* type_decl = nullptr;
    9086        };
     
    117113
    118114                static void implement( std::list< Declaration * > & translationUnit ) {
    119                         ThreadKeyword impl;
    120                         SymTab::acceptAndAdd( translationUnit, impl );
     115                        PassVisitor< ThreadKeyword > impl;
     116                        acceptAll( translationUnit, impl );
    121117                }
    122118        };
     
    148144
    149145                static void implement( std::list< Declaration * > & translationUnit ) {
    150                         CoroutineKeyword impl;
    151                         SymTab::acceptAndAdd( translationUnit, impl );
     146                        PassVisitor< CoroutineKeyword > impl;
     147                        acceptAll( translationUnit, impl );
    152148                }
    153149        };
     
    179175
    180176                static void implement( std::list< Declaration * > & translationUnit ) {
    181                         MonitorKeyword impl;
    182                         SymTab::acceptAndAdd( translationUnit, impl );
     177                        PassVisitor< MonitorKeyword > impl;
     178                        acceptAll( translationUnit, impl );
    183179                }
    184180        };
     
    192188        // }                                                               }
    193189        //
    194         class MutexKeyword final : public Visitor {
     190        class MutexKeyword final {
    195191          public:
    196192
    197                 using Visitor::visit;
    198                 virtual void visit( FunctionDecl * decl ) override final;
    199                 virtual void visit(   StructDecl * decl ) override final;
     193                void postvisit( FunctionDecl * decl );
     194                void postvisit(   StructDecl * decl );
    200195
    201196                std::list<DeclarationWithType*> findMutexArgs( FunctionDecl* );
     
    204199
    205200                static void implement( std::list< Declaration * > & translationUnit ) {
    206                         MutexKeyword impl;
     201                        PassVisitor< MutexKeyword > impl;
    207202                        acceptAll( translationUnit, impl );
    208203                }
     
    230225        // }                                                               }
    231226        //
    232         class ThreadStarter final : public Visitor {
     227        class ThreadStarter final {
    233228          public:
    234229
    235                 using Visitor::visit;
    236                 virtual void visit( FunctionDecl * decl ) override final;
     230                void postvisit( FunctionDecl * decl );
    237231
    238232                void addStartStatement( FunctionDecl * decl, DeclarationWithType * param );
    239233
    240234                static void implement( std::list< Declaration * > & translationUnit ) {
    241                         ThreadStarter impl;
     235                        PassVisitor< ThreadStarter > impl;
    242236                        acceptAll( translationUnit, impl );
    243237                }
     
    264258        // Generic keyword implementation
    265259        //=============================================================================================
    266         void ConcurrentSueKeyword::visit(StructDecl * decl) {
    267                 Visitor::visit(decl);
     260        void ConcurrentSueKeyword::postvisit(StructDecl * decl) {
    268261                if( decl->get_name() == type_name && decl->has_body() ) {
    269262                        assert( !type_decl );
     
    353346                }
    354347
    355                 declsToAdd.push_back( forward );
    356                 if( needs_main ) declsToAdd.push_back( main_decl );
    357                 declsToAdd.push_back( get_decl );
     348                declsToAddBefore.push_back( forward );
     349                if( needs_main ) declsToAddBefore.push_back( main_decl );
     350                declsToAddBefore.push_back( get_decl );
    358351
    359352                return get_decl;
     
    405398        //=============================================================================================
    406399
    407         void MutexKeyword::visit(FunctionDecl* decl) {
    408                 Visitor::visit(decl);
     400        void MutexKeyword::postvisit(FunctionDecl* decl) {
    409401
    410402                std::list<DeclarationWithType*> mutexArgs = findMutexArgs( decl );
     
    424416        }
    425417
    426         void MutexKeyword::visit(StructDecl* decl) {
    427                 Visitor::visit(decl);
     418        void MutexKeyword::postvisit(StructDecl* decl) {
    428419
    429420                if( decl->get_name() == "monitor_desc" ) {
     
    532523        // General entry routine
    533524        //=============================================================================================
    534         void ThreadStarter::visit(FunctionDecl * decl) {
    535                 Visitor::visit(decl);
    536 
     525        void ThreadStarter::postvisit(FunctionDecl * decl) {
    537526                if( ! CodeGen::isConstructor(decl->get_name()) ) return;
    538527
  • src/InitTweak/InitTweak.cc

    r326338ae rfbcb354  
    325325                        std::string name = getFunctionName( expr );
    326326                        assertf( name == "*?", "Unexpected untyped expression: %s", name.c_str() );
    327                         assertf( ! expr->get_args().empty(), "Can't get called function from dereference with no arguments" );
     327                        assertf( ! expr->get_args().empty(), "Cannot get called function from dereference with no arguments" );
    328328                        return getCalledFunction( expr->get_args().front() );
    329329                }
     
    433433                        std::string name = getFunctionName( expr );
    434434                        assertf( name == "*?", "Unexpected untyped expression: %s", name.c_str() );
    435                         assertf( ! expr->get_args().empty(), "Can't get function name from dereference with no arguments" );
     435                        assertf( ! expr->get_args().empty(), "Cannot get function name from dereference with no arguments" );
    436436                        return funcName( expr->get_args().front() );
    437437                }
  • src/Parser/StatementNode.cc

    r326338ae rfbcb354  
    212212        WaitForStmt::Target target;
    213213        target.function = maybeBuild<Expression>( targetExpr );
    214         buildMoveList< Expression >( targetExpr, target.arguments );
     214
     215        ExpressionNode * next = dynamic_cast<ExpressionNode *>( targetExpr->get_next() );
     216        targetExpr->set_next( nullptr );
     217        buildMoveList< Expression >( next, target.arguments );
     218
    215219        delete targetExpr;
    216220
     
    226230WaitForStmt * build_waitfor( ExpressionNode * targetExpr, StatementNode * stmt, ExpressionNode * when, WaitForStmt * node ) {
    227231        WaitForStmt::Target target;
    228 
    229232        target.function = maybeBuild<Expression>( targetExpr );
    230         buildMoveList< Expression >( targetExpr, target.arguments );
     233
     234        ExpressionNode * next = dynamic_cast<ExpressionNode *>( targetExpr->get_next() );
     235        targetExpr->set_next( nullptr );
     236        buildMoveList< Expression >( next, target.arguments );
     237
    231238        delete targetExpr;
    232239
  • src/Parser/lex.ll

    r326338ae rfbcb354  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Tue Aug 22 22:43:39 2017
    13  * Update Count     : 558
     12 * Last Modified On : Wed Aug 30 17:35:21 2017
     13 * Update Count     : 584
    1414 */
    1515
     
    1919
    2020%{
    21 // This lexer assumes the program has been preprocessed by cpp. Hence, all user level preprocessor directive have been
     21// The lexer assumes the program has been preprocessed by cpp. Hence, all user level preprocessor directive have been
    2222// performed and removed from the source. The only exceptions are preprocessor directives passed to the compiler (e.g.,
    2323// line-number directives) and C/C++ style comments, which are ignored.
     
    2525//**************************** Includes and Defines ****************************
    2626
     27unsigned int column = 0;                                                                // position of the end of the last token parsed
     28#define YY_USER_ACTION column += yyleng;                                // trigger before each matching rule's action
     29
    2730#include <string>
    2831#include <cstdio>                                                                               // FILENAME_MAX
     32using namespace std;
    2933
    3034#include "ParseNode.h"
     
    3236
    3337char *yyfilename;
    34 std::string *strtext;                                                                   // accumulate parts of character and string constant value
     38string *strtext;                                                                                // accumulate parts of character and string constant value
    3539
    3640#define RETURN_LOCN(x)          yylval.tok.loc.file = yyfilename; yylval.tok.loc.line = yylineno; return( x )
    37 #define RETURN_VAL(x)           yylval.tok.str = new std::string( yytext ); RETURN_LOCN( x )
     41#define RETURN_VAL(x)           yylval.tok.str = new string( yytext ); RETURN_LOCN( x )
    3842#define RETURN_CHAR(x)          yylval.tok.str = nullptr; RETURN_LOCN( x )
    3943#define RETURN_STR(x)           yylval.tok.str = strtext; RETURN_LOCN( x )
    4044
    4145#define WHITE_RETURN(x)         // do nothing
    42 #define NEWLINE_RETURN()        WHITE_RETURN( '\n' )
     46#define NEWLINE_RETURN()        column = 0; WHITE_RETURN( '\n' )
    4347#define ASCIIOP_RETURN()        RETURN_CHAR( (int)yytext[0] ) // single character operator
    4448#define NAMEDOP_RETURN(x)       RETURN_CHAR( x )                        // multichar operator, with a name
     
    154158                memcpy( &filename, begin_string + 1, length );  // copy file name from yytext
    155159                filename[ length ] = '\0';                                              // terminate string with sentinel
    156                 //std::cout << "file " << filename << " line " << lineno << std::endl;
     160                //cout << "file " << filename << " line " << lineno << endl;
    157161                yylineno = lineno;
    158162                yyfilename = filename;
     
    302306
    303307                                /* character constant, allows empty value */
    304 ({cwide_prefix}[_]?)?['] { BEGIN QUOTE; rm_underscore(); strtext = new std::string( yytext, yyleng ); }
     308({cwide_prefix}[_]?)?['] { BEGIN QUOTE; rm_underscore(); strtext = new string( yytext, yyleng ); }
    305309<QUOTE>[^'\\\n]* { strtext->append( yytext, yyleng ); }
    306310<QUOTE>['\n]    { BEGIN 0; strtext->append( yytext, yyleng ); RETURN_STR(CHARACTERconstant); }
     
    308312
    309313                                /* string constant */
    310 ({swide_prefix}[_]?)?["] { BEGIN STRING; rm_underscore(); strtext = new std::string( yytext, yyleng ); }
     314({swide_prefix}[_]?)?["] { BEGIN STRING; rm_underscore(); strtext = new string( yytext, yyleng ); }
    311315<STRING>[^"\\\n]* { strtext->append( yytext, yyleng ); }
    312316<STRING>["\n]   { BEGIN 0; strtext->append( yytext, yyleng ); RETURN_STR(STRINGliteral); }
     
    422426}
    423427
    424                                 /* unknown characters */
    425 .                               { printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno); }
     428                                /* unknown character */
     429.                               { yyerror( "unknown character" ); }
    426430
    427431%%
     432// ----end of lexer----
     433
     434void yyerror( const char * errmsg ) {
     435        cout << (yyfilename ? yyfilename : "*unknown file*") << ':' << yylineno << ':' << column - yyleng + 1
     436                 << ": " << SemanticError::error_str() << errmsg << " at token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << '"' << endl;
     437}
    428438
    429439// Local Variables: //
  • src/Parser/parser.yy

    r326338ae rfbcb354  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug 26 17:50:19 2017
    13 // Update Count     : 2712
     12// Last Modified On : Wed Aug 30 07:04:19 2017
     13// Update Count     : 2740
    1414//
    1515
     
    4848#include <cstdio>
    4949#include <stack>
     50using namespace std;
     51
    5052#include "ParseNode.h"
    5153#include "TypedefTable.h"
    5254#include "TypeData.h"
    5355#include "LinkageSpec.h"
    54 using namespace std;
     56#include "Common/SemanticError.h"                                               // error_str
    5557
    5658extern DeclarationNode * parseTree;
     
    31333135// ----end of grammar----
    31343136
    3135 extern char *yytext;
    3136 
    3137 void yyerror( const char * ) {
    3138         cout << "Error ";
    3139         if ( yyfilename ) {
    3140                 cout << "in file " << yyfilename << " ";
    3141         } // if
    3142         cout << "at line " << yylineno << " reading token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << endl;
    3143 }
    3144 
    31453137// Local Variables: //
    31463138// mode: c++ //
  • src/ResolvExpr/AlternativeFinder.cc

    r326338ae rfbcb354  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sat May 16 23:52:08 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jul 26 11:33:00 2017
    13 // Update Count     : 31
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Aug 28 13:47:24 2017
     13// Update Count     : 32
    1414//
    1515
     
    195195                                AltList winners;
    196196                                findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
    197                                 stream << "Can't choose between " << winners.size() << " alternatives for expression ";
     197                                stream << "Cannot choose between " << winners.size() << " alternatives for expression ";
    198198                                expr->print( stream );
    199199                                stream << "Alternatives are:";
  • src/SymTab/Validate.cc

    r326338ae rfbcb354  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Aug  8 13:27:00 2017
    13 // Update Count     : 358
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Aug 28 13:47:23 2017
     13// Update Count     : 359
    1414//
    1515
     
    709709                } else {
    710710                        TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() );
    711                         assertf( base != typedeclNames.end(), "Can't find typedecl name %s", typeInst->get_name().c_str() );
     711                        assertf( base != typedeclNames.end(), "Cannot find typedecl name %s", typeInst->get_name().c_str() );
    712712                        typeInst->set_baseType( base->second );
    713713                } // if
  • src/libcfa/concurrency/coroutine

    r326338ae rfbcb354  
    1 //                              - *- Mode: CFA - *-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    1110// Created On       : Mon Nov 28 12:27:26 2016
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sat Jul 22 09:57:17 2017
    14 // Update Count     : 2
     12// Last Modified On : Wed Aug 30 07:58:29 2017
     13// Update Count     : 3
    1514//
    1615
  • src/prelude/prelude.cf

    r326338ae rfbcb354  
    1 //                               -*- Mode: C -*-
    21//
    32// Copyright (C) Glen Ditchfield 1994, 1999
     
    87// Created On       : Sat Nov 29 07:23:41 2014
    98// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Tue Jul  5 18:04:40 2016
    11 // Update Count     : 92
     9// Last Modified On : Wed Aug 30 07:56:07 2017
     10// Update Count     : 93
    1211//
    1312
  • src/tests/.expect/castError.txt

    r326338ae rfbcb354  
    1 castError.c:7 error: Can't choose between 3 alternatives for expression Cast of:
     1castError.c:7:1 error: Cannot choose between 3 alternatives for expression Cast of:
    22  Name: f
    33
  • src/tests/.expect/completeTypeError.txt

    r326338ae rfbcb354  
    1 completeTypeError.c:34 error: No reasonable alternatives for expression Applying untyped:
     1completeTypeError.c:34:1 error: No reasonable alternatives for expression Applying untyped:
    22  Name: *?
    33...to:
     
    55
    66
    7 completeTypeError.c:36 error: No reasonable alternatives for expression Applying untyped:
     7completeTypeError.c:36:1 error: No reasonable alternatives for expression Applying untyped:
    88  Name: baz
    99...to:
     
    1111
    1212
    13 completeTypeError.c:37 error: No reasonable alternatives for expression Applying untyped:
     13completeTypeError.c:37:1 error: No reasonable alternatives for expression Applying untyped:
    1414  Name: quux
    1515...to:
     
    1717
    1818
    19 completeTypeError.c:58 error: No reasonable alternatives for expression Applying untyped:
     19completeTypeError.c:58:1 error: No reasonable alternatives for expression Applying untyped:
    2020  Name: baz
    2121...to:
     
    2323
    2424
    25 completeTypeError.c:59 error: No reasonable alternatives for expression Applying untyped:
     25completeTypeError.c:59:1 error: No reasonable alternatives for expression Applying untyped:
    2626  Name: quux
    2727...to:
     
    2929
    3030
    31 completeTypeError.c:60 error: No reasonable alternatives for expression Applying untyped:
     31completeTypeError.c:60:1 error: No reasonable alternatives for expression Applying untyped:
    3232  Name: *?
    3333...to:
     
    3535
    3636
    37 completeTypeError.c:72 error: No reasonable alternatives for expression Applying untyped:
     37completeTypeError.c:72:1 error: No reasonable alternatives for expression Applying untyped:
    3838  Name: baz
    3939...to:
  • src/tests/.expect/declarationErrors.txt

    r326338ae rfbcb354  
    1 declarationErrors.c:16 error: duplicate static in declaration of x1: static const volatile short int
     1declarationErrors.c:16:1 error: duplicate static in declaration of x1: static const volatile short int
    22
    3 declarationErrors.c:17 error: conflicting extern & static in declaration of x2: extern const volatile short int
     3declarationErrors.c:17:1 error: conflicting extern & static in declaration of x2: extern const volatile short int
    44
    5 declarationErrors.c:18 error: conflicting extern & auto, conflicting extern & static, conflicting extern & static, duplicate extern in declaration of x3: extern const volatile short int
     5declarationErrors.c:18:1 error: conflicting extern & auto, conflicting extern & static, conflicting extern & static, duplicate extern in declaration of x3: extern const volatile short int
    66
    7 declarationErrors.c:19 error: duplicate static in declaration of x4: static const volatile instance of const volatile struct __anonymous0
     7declarationErrors.c:19:1 error: duplicate static in declaration of x4: static const volatile instance of const volatile struct __anonymous0
    88  with members
    99   with body
    1010
    1111
    12 declarationErrors.c:20 error: duplicate const, duplicate static, duplicate volatile in declaration of x5: static const volatile instance of const volatile struct __anonymous1
     12declarationErrors.c:20:1 error: duplicate const, duplicate static, duplicate volatile in declaration of x5: static const volatile instance of const volatile struct __anonymous1
    1313  with members
    1414   with body
    1515
    1616
    17 declarationErrors.c:22 error: duplicate static in declaration of x6: static const volatile instance of type Int
     17declarationErrors.c:22:1 error: duplicate static in declaration of x6: static const volatile instance of type Int
    1818
    19 declarationErrors.c:24 error: duplicate const in declaration of f01: static inline function
     19declarationErrors.c:24:1 error: duplicate const in declaration of f01: static inline function
    2020  with no parameters
    2121  returning const volatile int
    2222
    2323
    24 declarationErrors.c:25 error: duplicate volatile in declaration of f02: static inline function
     24declarationErrors.c:25:1 error: duplicate volatile in declaration of f02: static inline function
    2525  with no parameters
    2626  returning const volatile int
    2727
    2828
    29 declarationErrors.c:26 error: duplicate const in declaration of f03: static inline function
     29declarationErrors.c:26:1 error: duplicate const in declaration of f03: static inline function
    3030  with no parameters
    3131  returning const volatile int
    3232
    3333
    34 declarationErrors.c:27 error: duplicate volatile in declaration of f04: static inline function
     34declarationErrors.c:27:1 error: duplicate volatile in declaration of f04: static inline function
    3535  with no parameters
    3636  returning const volatile int
    3737
    3838
    39 declarationErrors.c:28 error: duplicate const in declaration of f05: static inline function
     39declarationErrors.c:28:1 error: duplicate const in declaration of f05: static inline function
    4040  with no parameters
    4141  returning const volatile int
    4242
    4343
    44 declarationErrors.c:29 error: duplicate volatile in declaration of f06: static inline function
     44declarationErrors.c:29:1 error: duplicate volatile in declaration of f06: static inline function
    4545  with no parameters
    4646  returning const volatile int
    4747
    4848
    49 declarationErrors.c:30 error: duplicate const in declaration of f07: static inline function
     49declarationErrors.c:30:1 error: duplicate const in declaration of f07: static inline function
    5050  with no parameters
    5151  returning const volatile int
    5252
    5353
    54 declarationErrors.c:31 error: duplicate const, duplicate volatile in declaration of f08: static inline function
     54declarationErrors.c:31:1 error: duplicate const, duplicate volatile in declaration of f08: static inline function
    5555  with no parameters
    5656  returning const volatile int
    5757
    5858
    59 declarationErrors.c:33 error: duplicate const, duplicate volatile in declaration of f09: static inline function
     59declarationErrors.c:33:1 error: duplicate const, duplicate volatile in declaration of f09: static inline function
    6060  with no parameters
    6161  returning const volatile int
    6262
    6363
    64 declarationErrors.c:34 error: duplicate const, duplicate _Atomic, duplicate _Atomic, duplicate const, duplicate restrict, duplicate volatile in declaration of f09: static inline function
     64declarationErrors.c:34:1 error: duplicate const, duplicate _Atomic, duplicate _Atomic, duplicate const, duplicate restrict, duplicate volatile in declaration of f09: static inline function
    6565  with no parameters
    6666  returning const restrict volatile _Atomic int
  • src/tests/.expect/dtor-early-exit-ERR1.txt

    r326338ae rfbcb354  
    1 dtor-early-exit.c:142 error: jump to label 'L1' crosses initialization of y Branch (Goto)
     1dtor-early-exit.c:142:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)
     2
  • src/tests/.expect/dtor-early-exit-ERR2.txt

    r326338ae rfbcb354  
    1 dtor-early-exit.c:142 error: jump to label 'L2' crosses initialization of y Branch (Goto)
     1dtor-early-exit.c:142:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)
     2
  • src/tests/.expect/memberCtors-ERR1.txt

    r326338ae rfbcb354  
    1 memberCtors.c:71 error: in void ?{}(B &b), field a2 used before being constructed
     1memberCtors.c:71:1 error: in void ?{}(B &b), field a2 used before being constructed
  • src/tests/.expect/scopeErrors.txt

    r326338ae rfbcb354  
    1 scopeErrors.c:2 error: duplicate object definition for thisIsAnError: signed int
    2 scopeErrors.c:20 error: duplicate function definition for butThisIsAnError: function
     1scopeErrors.c:2:1 error: duplicate object definition for thisIsAnError: signed int
     2scopeErrors.c:20:1 error: duplicate function definition for butThisIsAnError: function
    33  with parameters
    44    double
    5   returning
     5  returning 
    66    _retval_butThisIsAnError:       Attribute with name: unused
    77double
    8   with body
     8  with body 
    99    CompoundStmt
     10
  • src/tests/div.c

    r326338ae rfbcb354  
    1 //                               -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    1110// Created On       : Tue Aug  8 16:28:43 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Wed Aug  9 17:09:40 2017
    14 // Update Count     : 16
     12// Last Modified On : Wed Aug 30 07:56:28 2017
     13// Update Count     : 17
    1514//
    1615
  • src/tests/ifcond.c

    r326338ae rfbcb354  
    1 //                               -*- Mode: C -*-
    21//
    3 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     2// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    43//
    54// The contents of this file are covered under the licence agreement in the
     
    1110// Created On       : Sat Aug 26 10:13:11 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sat Aug 26 11:13:00 2017
    14 // Update Count     : 11
     12// Last Modified On : Wed Aug 30 07:55:24 2017
     13// Update Count     : 13
    1514//
    1615
Note: See TracChangeset for help on using the changeset viewer.