Changeset 640b3df for src/main.cc


Ignore:
Timestamp:
Feb 21, 2023, 4:24:34 PM (3 years ago)
Author:
caparson <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
257a8f5, ce44c5f
Parents:
1180175 (diff), 9a533ba (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r1180175 r640b3df  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Oct  5 12:06:00 2022
    13 // Update Count     : 679
     12// Last Modified On : Thr Feb 16 10:08:00 2023
     13// Update Count     : 680
    1414//
    1515
     
    4040#include "CodeTools/TrackLoc.h"             // for fillLocations
    4141#include "Common/CodeLocationTools.hpp"     // for forceFillCodeLocations
    42 #include "Common/CompilerError.h"           // for CompilerError
    4342#include "Common/DeclStats.hpp"             // for printDeclStats
    4443#include "Common/ResolvProtoDump.hpp"       // for dumpAsResolverProto
    4544#include "Common/Stats.h"                   // for Stats
    46 #include "Common/UnimplementedError.h"      // for UnimplementedError
    4745#include "Common/utility.h"                 // for deleteAll, filter, printAll
    4846#include "Concurrency/Actors.hpp"           // for implementActors
     
    274272                        FILE * gcc_builtins = fopen( (PreludeDirector + "/gcc-builtins.cf").c_str(), "r" );
    275273                        assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
    276                         parse( gcc_builtins, LinkageSpec::Compiler );
     274                        parse( gcc_builtins, ast::Linkage::Compiler );
    277275
    278276                        // read the extra prelude in, if not generating the cfa library
    279277                        FILE * extras = fopen( (PreludeDirector + "/extras.cf").c_str(), "r" );
    280278                        assertf( extras, "cannot open extras.cf\n" );
    281                         parse( extras, LinkageSpec::BuiltinC );
     279                        parse( extras, ast::Linkage::BuiltinC );
    282280
    283281                        if ( ! libcfap ) {
     
    285283                                FILE * prelude = fopen( (PreludeDirector + "/prelude.cfa").c_str(), "r" );
    286284                                assertf( prelude, "cannot open prelude.cfa\n" );
    287                                 parse( prelude, LinkageSpec::Intrinsic );
     285                                parse( prelude, ast::Linkage::Intrinsic );
    288286
    289287                                // Read to cfa builtins, if not generating the cfa library
    290288                                FILE * builtins = fopen( (PreludeDirector + "/builtins.cf").c_str(), "r" );
    291289                                assertf( builtins, "cannot open builtins.cf\n" );
    292                                 parse( builtins, LinkageSpec::BuiltinCFA );
    293                         } // if
    294                 } // if
    295 
    296                 parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, yydebug );
     290                                parse( builtins, ast::Linkage::BuiltinCFA );
     291                        } // if
     292                } // if
     293
     294                parse( input, libcfap ? ast::Linkage::Intrinsic : ast::Linkage::Cforall, yydebug );
    297295
    298296                transUnit = buildUnit();
     
    342340                PASS( "Generate Autogen Routines", Validate::autogenerateRoutines( transUnit ) );
    343341
    344         PASS( "Implement Actors", Concurrency::implementActors( transUnit ) );
    345 
     342                PASS( "Implement Actors", Concurrency::implementActors( transUnit ) );
    346343                PASS( "Implement Mutex", Concurrency::implementMutex( transUnit ) );
    347344                PASS( "Implement Thread Start", Concurrency::implementThreadStarter( transUnit ) );
     
    476473                } // if
    477474                e.print();
    478                 if ( output != &cout ) {
    479                         delete output;
    480                 } // if
    481                 return EXIT_FAILURE;
    482         } catch ( UnimplementedError & e ) {
    483                 cout << "Sorry, " << e.get_what() << " is not currently implemented" << endl;
    484                 if ( output != &cout ) {
    485                         delete output;
    486                 } // if
    487                 return EXIT_FAILURE;
    488         } catch ( CompilerError & e ) {
    489                 cerr << "Compiler Error: " << e.get_what() << endl;
    490                 cerr << "(please report bugs to [REDACTED])" << endl;
    491475                if ( output != &cout ) {
    492476                        delete output;
Note: See TracChangeset for help on using the changeset viewer.