Changeset d63eeb0 for src/main.cc


Ignore:
Timestamp:
Feb 9, 2016, 3:25:05 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
7528ba1
Parents:
771b3c3 (diff), bd85400 (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' into ctor

Conflicts:

src/CodeGen/CodeGenerator.cc
src/GenPoly/Box.cc
src/Makefile.in
src/Parser/ParseNode.h
src/Parser/parser.cc
src/Parser/parser.yy
src/SymTab/Validate.cc
src/SynTree/Initializer.h
src/SynTree/ObjectDecl.cc
src/SynTree/Visitor.h
src/main.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r771b3c3 rd63eeb0  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jan 19 16:28:13 2016
    13 // Update Count     : 194
     12// Last Modified On : Tue Feb 09 13:28:11 2016
     13// Update Count     : 200
    1414//
    1515
     
    2424#include "SynTree/Declaration.h"
    2525#include "SynTree/Visitor.h"
    26 #include "GenPoly/InstantiateGeneric.h"
    2726#include "GenPoly/Lvalue.h"
    2827#include "GenPoly/Specialize.h"
     
    4645//#include "Try/Visit.h"
    4746
    48 #include "SemanticError.h"
    49 #include "UnimplementedError.h"
     47#include "Common/SemanticError.h"
     48#include "Common/UnimplementedError.h"
    5049
    5150#include "../config.h"
     
    7271        resolvep = false,                                                                       // used in AlternativeFinder
    7372        symtabp = false,
     73        treep = false,
    7474        validp = false,
    7575        errorp = false,
    7676        codegenp = false;
    7777
    78 enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };
     78enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, Validate, };
    7979
    8080static struct option long_opts[] = {
     
    9191        { "resolver", no_argument, 0, Resolver },
    9292        { "symbol", no_argument, 0, Symbol },
     93        { "tree", no_argument, 0, Tree },
    9394        { "validate", no_argument, 0, Validate },
    9495        { 0, 0, 0, 0 }
     
    104105
    105106        int c;
    106         while ( (c = getopt_long( argc, argv, "abcefFglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
     107        while ( (c = getopt_long( argc, argv, "abcefFglnpqrstvyzD:", long_opts, &long_index )) != -1 ) {
    107108                switch ( c ) {
    108109                  case Ast:
     
    153154                  case 's':                                                                             // print symbol table events
    154155                        symtabp = true;
     156                        break;
     157                  case Tree:
     158                  case 't':                                                                             // build in tree
     159                        treep = true;
    155160                        break;
    156161                  case 'v':                                                                             // dump AST after decl validation pass
     
    195200                if ( ! nopreludep ) {                                                   // include gcc builtins
    196201                        // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here.
    197                         FILE * builtins = fopen( libcfap ? "./builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     202                        FILE * builtins = fopen( libcfap | treep ? "builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    198203                        if ( builtins == NULL ) {
    199                                 std::cerr << "Error: can't open builtins" << std::endl;
     204                                std::cerr << "Error: can't open builtins.cf" << std::endl;
    200205                                exit( 1 );
    201206                        } // if
     
    205210                        if ( ! libcfap ) {
    206211                                // read the prelude in, if not generating the cfa library
    207                                 FILE * prelude = fopen( CFA_LIBDIR "/prelude.cf", "r" );
     212                                FILE * prelude = fopen( treep ? "prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
    208213                                if ( prelude == NULL ) {
    209                                         std::cerr << "Error: can't open prelude" << std::endl;
     214                                        std::cerr << "Error: can't open prelude.cf" << std::endl;
    210215                                        exit( 1 );
    211216                                } // if
     
    281286                }
    282287
    283                 OPTPRINT( "instantiateGeneric" )
    284                 GenPoly::instantiateGeneric( translationUnit );
    285288                OPTPRINT( "copyParams" );
    286289                GenPoly::copyParams( translationUnit );
Note: See TracChangeset for help on using the changeset viewer.