Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rdaf1af8 r7e003011  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 16:00:00 2017
    13 // Update Count     : 485
     12// Last Modified On : Wed May 10 14:45:00 2017
     13// Update Count     : 484
    1414//
    1515
     
    112112
    113113        CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC, bool lineMarks ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ) {}
     114
     115        CodeGenerator::CodeGenerator( std::ostream & os, std::string init, int indentation, bool infunp )
     116                        : indent( *this), cur_indent( indentation ), insideFunction( infunp ), output( os ), printLabels( *this ) {
     117                //output << std::string( init );
     118        }
     119
     120        CodeGenerator::CodeGenerator( std::ostream & os, char * init, int indentation, bool infunp )
     121                        : indent( *this ), cur_indent( indentation ), insideFunction( infunp ), output( os ), printLabels( *this ) {
     122                //output << std::string( init );
     123        }
    114124
    115125        string CodeGenerator::mangleName( DeclarationWithType * decl ) {
     
    908918        }
    909919
    910         void CodeGenerator::visit( ThrowStmt * throwStmt ) {
    911                 assertf( ! genC, "Throw statements should not reach code generation." );
    912 
    913                 output << ((throwStmt->get_kind() == ThrowStmt::Terminate) ?
    914                            "throw" : "throwResume");
    915                 if (throwStmt->get_expr()) {
    916                         output << " ";
    917                         throwStmt->get_expr()->accept( *this );
    918                 }
    919                 if (throwStmt->get_target()) {
    920                         output << " _At ";
    921                         throwStmt->get_target()->accept( *this );
    922                 }
    923                 output << ";";
    924         }
    925 
    926920        void CodeGenerator::visit( WhileStmt * whileStmt ) {
    927921                if ( whileStmt->get_isDoWhile() ) {
Note: See TracChangeset for help on using the changeset viewer.