Changeset 7527e63 for src/main.cc


Ignore:
Timestamp:
Aug 16, 2016, 3:20:06 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1f6d4624
Parents:
950f7a7 (diff), 7880579 (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

    r950f7a7 r7527e63  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul  5 15:23:11 2016
    13 // Update Count     : 209
     12// Last Modified On : Mon Aug 15 17:58:57 2016
     13// Update Count     : 220
    1414//
    1515
    1616#include <iostream>
    1717#include <fstream>
    18 #include <cstdlib>
    19 #include <cstdio>
    2018#include <getopt.h>
    2119#include "Parser/Parser.h"
    22 #include "Parser/ParseNode.h"
    23 #include "Parser/LinkageSpec.h"
    2420#include "SynTree/Declaration.h"
    2521#include "SynTree/Visitor.h"
     
    2824#include "GenPoly/Box.h"
    2925#include "GenPoly/CopyParams.h"
     26#include "GenPoly/InstantiateGeneric.h"
    3027#include "CodeGen/Generate.h"
    3128#include "CodeGen/FixNames.h"
     
    4239#include "InitTweak/GenInit.h"
    4340#include "InitTweak/FixInit.h"
    44 #include "InitTweak/FixGlobalInit.h"
    45 //#include "Explain/GenProlog.h"
    46 //#include "Try/Visit.h"
    4741
    4842#include "Common/SemanticError.h"
     
    193187                        input = fopen( argv[ optind ], "r" );
    194188                        if ( ! input ) {
    195                                 std::cout << "Error: can't open " << argv[ optind ] << std::endl;
     189                                std::cout << "Error: cannot open " << argv[ optind ] << std::endl;
    196190                                exit( EXIT_FAILURE );
    197191                        } // if
     
    219213                        FILE * builtins = fopen( libcfap | treep ? "builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    220214                        if ( builtins == NULL ) {
    221                                 std::cerr << "Error: can't open builtins.cf" << std::endl;
     215                                std::cerr << "Error: cannot open builtins.cf" << std::endl;
    222216                                exit( EXIT_FAILURE );
    223217                        } // if
     
    227221                        FILE * extras = fopen( libcfap | treep ? "extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
    228222                        if ( extras == NULL ) {
    229                                 std::cerr << "Error: can't open extras.cf" << std::endl;
     223                                std::cerr << "Error: cannot open extras.cf" << std::endl;
    230224                                exit( EXIT_FAILURE );
    231225                        } // if
     
    236230                                FILE * prelude = fopen( treep ? "prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
    237231                                if ( prelude == NULL ) {
    238                                         std::cerr << "Error: can't open prelude.cf" << std::endl;
     232                                        std::cerr << "Error: cannot open prelude.cf" << std::endl;
    239233                                        exit( EXIT_FAILURE );
    240234                                } // if
     
    282276                OPTPRINT( "fixNames" )
    283277                CodeGen::fixNames( translationUnit );
    284                 OPTPRINT( "fixGlobalInit" );
    285                 InitTweak::fixGlobalInit( translationUnit, filename, libcfap || treep );
    286278                OPTPRINT( "tweakInit" )
    287279                InitTweak::genInit( translationUnit );
     
    304296                }
    305297
     298                // fix ObjectDecl - replaces ConstructorInit nodes
    306299                OPTPRINT( "fixInit" )
    307                 // fix ObjectDecl - replaces ConstructorInit nodes
    308                 InitTweak::fix( translationUnit );
     300                InitTweak::fix( translationUnit, filename, libcfap || treep );
    309301                if ( ctorinitp ) {
    310302                        dump ( translationUnit );
     
    312304                }
    313305
     306                OPTPRINT("instantiateGenerics")
     307                GenPoly::instantiateGeneric( translationUnit );
    314308                OPTPRINT( "copyParams" );
    315309                GenPoly::copyParams( translationUnit );
     
    384378        std::list< Declaration * > decls;
    385379        if ( noprotop ) {
    386                 filter( translationUnit.begin(), translationUnit.end(),
    387                                 std::back_inserter( decls ), notPrelude );
     380                filter( translationUnit.begin(), translationUnit.end(), std::back_inserter( decls ), notPrelude );
    388381        } else {
    389382                decls = translationUnit;
Note: See TracChangeset for help on using the changeset viewer.