Changeset 71f4e4f for src/main.cc


Ignore:
Timestamp:
Jan 13, 2016, 5:19:47 PM (9 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:
f1e012b
Parents:
02c7d04
Message:

added ConstructorInit?, simple constructors and destructors work correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r02c7d04 r71f4e4f  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // main.cc -- 
     7// main.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Fri May 15 23:12:02 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec 17 12:59:06 2015
    13 // Update Count     : 179
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Jan 13 16:47:25 2016
     13// Update Count     : 181
    1414//
    1515
     
    4242#include "InitTweak/Mutate.h"
    4343#include "InitTweak/RemoveInit.h"
     44#include "InitTweak/FixInit.h"
    4445//#include "Explain/GenProlog.h"
    4546//#include "Try/Visit.h"
     
    99100
    100101        opterr = 0;                                                                                     // prevent getopt from printing error messages
    101        
     102
    102103        int c;
    103104        while ( (c = getopt_long( argc, argv, "abefglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
     
    182183                        output = new ofstream( argv[ optind ] );
    183184                } // if
    184        
     185
    185186                Parser::get_parser().set_debug( grammarp );
    186187
     
    203204                                        exit( 1 );
    204205                                } // if
    205                    
     206
    206207                                parse( prelude, LinkageSpec::Intrinsic );
    207208                        } // if
    208209                } // if
    209210
    210                 parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, grammarp );     
    211  
     211                parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, grammarp );
     212
    212213                if ( parsep ) {
    213214                        Parser::get_parser().get_parseTree()->printList( std::cout );
     
    244245                OPTPRINT( "mutate" )
    245246                ControlStruct::mutate( translationUnit );
    246                 OPTPRINT( "fixNames" ) 
     247                OPTPRINT( "fixNames" )
    247248                CodeGen::fixNames( translationUnit );
    248249                OPTPRINT( "tweak" )
     
    264265                        dump( translationUnit );
    265266                }
     267
     268                // fix ObjectDecl - replaces ConstructorInit nodes
     269                InitTweak::fix( translationUnit );
    266270
    267271                OPTPRINT( "instantiateGeneric" )
     
    331335        std::list< Declaration * > decls;
    332336        if ( noprotop ) {
    333                 filter( translationUnit.begin(), translationUnit.end(), 
     337                filter( translationUnit.begin(), translationUnit.end(),
    334338                                std::back_inserter( decls ), notPrelude );
    335339        } else {
Note: See TracChangeset for help on using the changeset viewer.