Changes in / [c3a4385:4eb1db6]


Ignore:
Location:
src
Files:
2 added
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    rc3a4385 r4eb1db6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 23:38:22 2015
    13 // Update Count     : 2
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Tue Jun 02 11:07:25 2015
     13// Update Count     : 3
    1414//
    1515
     
    1818
    1919#include "GenType.h"
    20 #include "CodeGenerator2.h"
     20#include "CodeGenerator.h"
    2121#include "SynTree/Visitor.h"
    2222#include "SynTree/Type.h"
     
    9797                } // if
    9898                if ( dimension != 0 ) {
    99                         CodeGenerator2 cg( os );
     99                        CodeGenerator cg( os );
    100100                        dimension->accept( cg );
    101101                } // if
     
    148148                        } // if
    149149                } else {
    150                         CodeGenerator2 cg( os );
     150                        CodeGenerator cg( os );
    151151                        os << "(" ;
    152152
  • src/CodeGen/Generate.cc

    rc3a4385 r4eb1db6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 23:39:24 2015
    13 // Update Count     : 1
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Tue Jun 02 11:08:44 2015
     13// Update Count     : 4
    1414//
    1515
     
    2222#include "SynTree/Declaration.h"
    2323
    24 #include "CodeGenerator2.h"
     24#include "CodeGenerator.h"
    2525
    2626using namespace std;
     
    2828namespace CodeGen {
    2929        void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ) {
    30                 CodeGen::CodeGenerator2 cgv( os );
     30                CodeGen::CodeGenerator cgv( os );
    3131
    3232                for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end();  i++ ) {
    3333                        if ( LinkageSpec::isGeneratable( (*i)->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( (*i)->get_linkage() ) ) ) {
    3434                                (*i)->accept(cgv);
    35                                 cgv.shift_left();
    3635                                if ( doSemicolon( *i ) ) {
    3736                                        os << ";";
  • src/CodeGen/module.mk

    rc3a4385 r4eb1db6  
    1919
    2020SRC +=  CodeGen/Generate.cc \
    21         CodeGen/CodeGenerator2.cc \
     21        CodeGen/CodeGenerator.cc \
    2222        CodeGen/GenType.cc \
    2323        CodeGen/FixNames.cc \
  • src/Common/utility.h

    rc3a4385 r4eb1db6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 15:34:57 2015
    13 // Update Count     : 3
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri May 29 16:17:02 2015
     13// Update Count     : 7
    1414//
    1515
     
    198198}
    199199
     200// it's nice to actually be able to increment iterators by an arbitrary amount
     201template< typename Iterator >
     202Iterator operator+(Iterator i, int inc) {
     203        while ( inc > 0 ) {
     204                ++i;
     205                --inc;
     206        }
     207        return i;
     208}
     209
    200210#endif // _UTILITY_H
    201211
  • src/ControlStruct/LabelFixer.cc

    rc3a4385 r4eb1db6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 27 16:16:14 2015
    13 // Update Count     : 4
     12// Last Modified On : Fri May 29 15:57:12 2015
     13// Update Count     : 82
    1414//
    1515
     
    2323#include "utility.h"
    2424
     25#include <iostream>
     26
    2527namespace ControlStruct {
    26         LabelFixer::Entry::Entry( Statement *to, Statement *from ) : definition ( to ) {
     28        LabelFixer::Entry::Entry( Statement *to, BranchStmt *from ) : definition ( to ) {
    2729                if ( from != 0 )
    2830                        usage.push_back( from );
     
    3133        bool LabelFixer::Entry::insideLoop() {
    3234                return ( dynamic_cast< ForStmt * > ( definition ) ||
    33                                  dynamic_cast< WhileStmt * > ( definition )  );
     35                        dynamic_cast< WhileStmt * > ( definition )  );
    3436        }
    3537
     
    4648        }
    4749
     50        // prune to at most one label definition for each statement
    4851        void LabelFixer::visit( Statement *stmt ) {
    4952                std::list< Label > &labels = stmt->get_labels();
    5053
    5154                if ( ! labels.empty() ) {
     55                        // only remember one label for each statement
    5256                        Label current = setLabelsDef( labels, stmt );
    5357                        labels.clear();
     
    5761
    5862        void LabelFixer::visit( BranchStmt *branchStmt ) {
    59                 visit ( ( Statement * )branchStmt );  // the labels this statement might have
     63                visit ( ( Statement * )branchStmt );
    6064
    61                 Label target;
    62                 if ( (target = branchStmt->get_target()) != "" ) {
     65                // for labeled branches, add an entry to the label table
     66                Label target = branchStmt->get_target();
     67                if ( target != "" ) {
    6368                        setLabelsUsg( target, branchStmt );
    64                 } //else       /* computed goto or normal exit-loop statements */
     69                }
    6570        }
    6671
     72        // sets the definition of the labelTable entry to be the provided
     73        // statement for every label in the list parameter. Happens for every kind of statement
    6774        Label LabelFixer::setLabelsDef( std::list< Label > &llabel, Statement *definition ) {
    6875                assert( definition != 0 );
    69                 Entry *entry = new Entry( definition );
    70                 bool used = false;
     76                assert( llabel.size() > 0 );
    7177
    72                 for ( std::list< Label >::iterator i = llabel.begin(); i != llabel.end(); i++ )
    73                         if ( labelTable.find( *i ) == labelTable.end() )
    74                                 { used = true; labelTable[ *i ] = entry; } // undefined and unused
    75                         else
    76                                 if ( labelTable[ *i ]->defined() )
    77                                         throw SemanticError( "Duplicate definition of label: " + *i );
    78                                 else
    79                                         labelTable[ *i ]->set_definition( definition );
     78                for ( std::list< Label >::iterator i = llabel.begin(); i != llabel.end(); i++ ) {
     79                        if ( labelTable.find( *i ) == labelTable.end() ) {
     80                                // undefined and unused until now, add an entry
     81                                labelTable[ *i ] =  new Entry( definition );
     82                        } else if ( labelTable[ *i ]->defined() ) {\
     83                                // defined twice, error
     84                                throw SemanticError( "Duplicate definition of label: " + *i );
     85                        }       else {
     86                                // used previously, but undefined until now -> set its definition to this location
     87                                labelTable[ *i ]->set_definition( definition );
     88                        } // if
     89                } // for
    8090
    81                 if ( ! used ) delete entry;
    82 
    83                 return labelTable[ llabel.front() ]->get_label();  // this *must* exist
     91                // produce one of the labels attached to this statement to be
     92                // temporarily used as the canonical label
     93                return labelTable[ llabel.front() ]->get_label();
    8494        }
    8595
    86         Label LabelFixer::setLabelsUsg( Label orgValue, Statement *use ) {
     96        // Remember all uses of a label.
     97        void LabelFixer::setLabelsUsg( Label orgValue, BranchStmt *use ) {
    8798                assert( use != 0 );
    8899
    89                 if ( labelTable.find( orgValue ) != labelTable.end() )
    90                         labelTable[ orgValue ]->add_use( use );         // the label has been defined or used before
    91                 else
     100                if ( labelTable.find( orgValue ) != labelTable.end() ) {
     101                        // the label has been defined or used before
     102                        labelTable[ orgValue ]->add_use( use );
     103                } else {
    92104                        labelTable[ orgValue ] = new Entry( 0, use );
    93 
    94                 return labelTable[ orgValue ]->get_label();
     105                }
    95106        }
    96107
     108        // Ultimately builds a table that maps a label to its defining statement.
     109        // In the process,
    97110        std::map<Label, Statement * > *LabelFixer::resolveJumps() throw ( SemanticError ) {
    98111                std::map< Statement *, Entry * > def_us;
    99112
    100                 for ( std::map< Label, Entry *>::iterator i = labelTable.begin(); i != labelTable.end(); i++ ) {
     113                // combine the entries for all labels that target the same location
     114                for ( std::map< Label, Entry *>::iterator i = labelTable.begin(); i != labelTable.end(); ++i ) {
    101115                        Entry *e = i->second;
    102116
    103117                        if ( def_us.find ( e->get_definition() ) == def_us.end() ) {
    104118                                def_us[ e->get_definition() ] = e;                             
    105                         } else {
    106                                 if ( e->used() )
    107                                         def_us[ e->get_definition() ]->add_uses( e->get_uses() );
     119                        } else if ( e->used() ) {
     120                                def_us[ e->get_definition() ]->add_uses( e->get_uses() );
    108121                        }
    109122                }
    110123
    111                 // get rid of labelTable
    112                 for ( std::map< Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); i++ ) {
     124                // create a unique label for each target location.
     125                for ( std::map< Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); ++i ) {
    113126                        Statement *to = (*i).first;
    114                         std::list< Statement *> &from = (*i).second->get_uses();
    115                         Label finalLabel = generator->newLabel();
    116                         (*i).second->set_label( finalLabel );
     127                        Entry * entry = (*i).second;
     128                        std::list< BranchStmt *> &from = entry->get_uses();
    117129
     130                        // no label definition found
    118131                        if ( to == 0 ) {
    119                                 BranchStmt *first_use = dynamic_cast<BranchStmt *>(from.back());
    120                                 Label undef("");
    121                                 if ( first_use != 0 )
    122                                         undef = first_use->get_target();
     132                                Label undef = from.back()->get_target();
    123133                                throw SemanticError ( "'" + undef + "' label not defined");
    124134                        }
     135
     136                        // generate a new label, and attach it to its defining statement
     137                        // as the only label on that statement
     138                        Label finalLabel = generator->newLabel();
     139                        entry->set_label( finalLabel );
    125140
    126141                        to->get_labels().clear();
    127142                        to->get_labels().push_back( finalLabel );
    128143
    129                         for ( std::list< Statement *>::iterator j = from.begin(); j != from.end(); j++ ) {
    130                                 BranchStmt *jumpTo = dynamic_cast< BranchStmt * > ( *j );
    131                                 assert( jumpTo != 0 );
    132                                 jumpTo->set_target( finalLabel );
     144                        // redirect each of the source branch statements to the new target label
     145                        for ( std::list< BranchStmt *>::iterator j = from.begin(); j != from.end(); ++j ) {
     146                                BranchStmt *jump = *j;
     147                                assert( jump != 0 );
     148                                jump->set_target( finalLabel );
    133149                        } // for
    134150                } // for
    135151
    136                 // reverse table
     152                // create a table where each label maps to its defining statement
    137153                std::map< Label, Statement * > *ret = new std::map< Label, Statement * >();
    138                 for ( std::map< Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); i++ )
     154                for ( std::map< Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); ++i ) {
    139155                        (*ret)[ (*i).second->get_label() ] = (*i).first;
     156                }
    140157
    141158                return ret;
  • src/ControlStruct/LabelFixer.h

    rc3a4385 r4eb1db6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue May 26 12:55:10 2015
    13 // Update Count     : 4
     12// Last Modified On : Fri May 29 15:25:55 2015
     13// Update Count     : 11
    1414//
    1515
     
    5555
    5656                Label setLabelsDef( std::list< Label > &, Statement *definition );
    57                 Label setLabelsUsg( Label, Statement *usage = 0 );
     57                void setLabelsUsg( Label, BranchStmt *usage = 0 );
    5858
    5959          private:
    6060                class Entry {
    6161                  public:
    62                         Entry( Statement *to = 0, Statement *from = 0 );
     62                        Entry( Statement *to = 0, BranchStmt *from = 0 );
    6363                        bool used() { return ( usage.empty() ); }
    6464                        bool defined() { return ( definition != 0 ); }
     
    7171                        void set_definition( Statement *def ) { definition = def; }
    7272
    73                         std::list< Statement *> &get_uses() { return usage; }
    74                         void add_use ( Statement *use ) { usage.push_back( use ); }
    75                         void add_uses ( std::list<Statement *> uses ) { usage.insert( usage.end(), uses.begin(), uses.end() ); }
     73                        std::list< BranchStmt *> &get_uses() { return usage; }
     74                        void add_use ( BranchStmt *use ) { usage.push_back( use ); }
     75                        void add_uses ( std::list<BranchStmt *> uses ) { usage.insert( usage.end(), uses.begin(), uses.end() ); }
    7676                  private:
    7777                        Label label; 
    7878                        Statement *definition;
    79                         std::list<Statement *> usage;
     79                        std::list<BranchStmt *> usage;
    8080                };
    8181                 
  • src/ControlStruct/MLEMutator.cc

    rc3a4385 r4eb1db6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 27 16:19:32 2015
    13 // Update Count     : 44
     12// Last Modified On : Tue Jun 02 13:43:01 2015
     13// Update Count     : 92
    1414//
    1515
     
    3333                } // if
    3434
     35                // a child statement may set the break label
     36                // - if they do, attach it to the next statement
    3537                std::list< Statement * > &kids = cmpndStmt->get_kids();
    3638                for ( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) {
     
    3840
    3941                        if ( ! get_breakLabel().empty() ) {
    40                                 std::list< Statement * >::iterator next = k; next++;
     42                                std::list< Statement * >::iterator next = k+1;
    4143                                if ( next == kids.end() ) {
    4244                                        std::list<Label> ls; ls.push_back( get_breakLabel() );
     
    5860                } // if
    5961
    60                 //mutateAll( cmpndStmt->get_kids(), *this );
    6162                return cmpndStmt;
    6263        }
     
    7677        Statement *MLEMutator::mutate( ForStmt *forStmt ) {
    7778                enclosingLoops.push_back( Entry( forStmt ) );
    78                 maybeMutate( forStmt->get_body(), *this );
     79                forStmt->set_body( maybeMutate( forStmt->get_body(), *this ) );
    7980
    8081                Entry &e = enclosingLoops.back();
     
    154155                Label brkLabel = generator->newLabel();
    155156                enclosingSwitches.push_back( Entry(switchStmt, "", brkLabel) );
    156                 mutateAll( switchStmt->get_branches(), mutator ); {
     157                mutateAll( switchStmt->get_branches(), mutator );
     158                {
    157159                        // check if this is necessary (if there is a break to this point, otherwise do not generate
    158                         std::list<Label> temp; temp.push_back( brkLabel );
    159                         switchStmt->get_branches().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
     160
     161                        // for the purposes of keeping switch statements uniform (i.e. all statements that are
     162                        // direct children of a switch should be CastStmts), append the exit label + break to the
     163                        // last case statement; create a default case if there are no cases
     164                        std::list< Statement * > &branches = switchStmt->get_branches();
     165                        if ( branches.empty() ) {
     166                                branches.push_back( CaseStmt::makeDefault() );
     167                        }
     168
     169                        if ( CaseStmt * c = dynamic_cast< CaseStmt * >( branches.back() ) ) {
     170                                std::list<Label> temp; temp.push_back( brkLabel );
     171                                c->get_statements().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
     172                        } else assert(0);
    160173                }
    161174                assert ( enclosingSwitches.back() == switchStmt );
     
    173186
    174187        Statement *MLEMutator::mutateLoop( Statement *bodyLoop, Entry &e ) {
     188                // ensure loop body is a block
    175189                CompoundStmt *newBody;
    176190                if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) {
     
    204218        }
    205219
    206         //*** Entry's methods
     220        //*** Entry's methods - ensure these labels can be set at most once
    207221        void MLEMutator::Entry::set_contExit( Label l ) {
    208222                assert ( contExit == "" || contExit == l );
  • src/Makefile.in

    rc3a4385 r4eb1db6  
    9898am__objects_1 = cfa_cpp-main.$(OBJEXT) cfa_cpp-MakeLibCfa.$(OBJEXT) \
    9999        CodeGen/cfa_cpp-Generate.$(OBJEXT) \
    100         CodeGen/cfa_cpp-CodeGenerator2.$(OBJEXT) \
     100        CodeGen/cfa_cpp-CodeGenerator.$(OBJEXT) \
    101101        CodeGen/cfa_cpp-GenType.$(OBJEXT) \
    102102        CodeGen/cfa_cpp-FixNames.$(OBJEXT) \
     
    335335AUTOMAKE_OPTIONS = subdir-objects
    336336SRC = main.cc MakeLibCfa.cc CodeGen/Generate.cc \
    337         CodeGen/CodeGenerator2.cc CodeGen/GenType.cc \
     337        CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
    338338        CodeGen/FixNames.cc CodeGen/OperatorTable.cc \
    339339        Common/SemanticError.cc Common/UniqueName.cc \
     
    475475CodeGen/cfa_cpp-Generate.$(OBJEXT): CodeGen/$(am__dirstamp) \
    476476        CodeGen/$(DEPDIR)/$(am__dirstamp)
    477 CodeGen/cfa_cpp-CodeGenerator2.$(OBJEXT): CodeGen/$(am__dirstamp) \
     477CodeGen/cfa_cpp-CodeGenerator.$(OBJEXT): CodeGen/$(am__dirstamp) \
    478478        CodeGen/$(DEPDIR)/$(am__dirstamp)
    479479CodeGen/cfa_cpp-GenType.$(OBJEXT): CodeGen/$(am__dirstamp) \
     
    760760mostlyclean-compile:
    761761        -rm -f *.$(OBJEXT)
    762         -rm -f CodeGen/cfa_cpp-CodeGenerator2.$(OBJEXT)
     762        -rm -f CodeGen/cfa_cpp-CodeGenerator.$(OBJEXT)
    763763        -rm -f CodeGen/cfa_cpp-FixNames.$(OBJEXT)
    764764        -rm -f CodeGen/cfa_cpp-GenType.$(OBJEXT)
     
    868868@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfa_cpp-MakeLibCfa.Po@am__quote@
    869869@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfa_cpp-main.Po@am__quote@
    870 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Po@am__quote@
     870@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Po@am__quote@
    871871@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-FixNames.Po@am__quote@
    872872@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-GenType.Po@am__quote@
     
    10291029@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeGen/cfa_cpp-Generate.obj `if test -f 'CodeGen/Generate.cc'; then $(CYGPATH_W) 'CodeGen/Generate.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/Generate.cc'; fi`
    10301030
    1031 CodeGen/cfa_cpp-CodeGenerator2.o: CodeGen/CodeGenerator2.cc
    1032 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/cfa_cpp-CodeGenerator2.o -MD -MP -MF CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Tpo -c -o CodeGen/cfa_cpp-CodeGenerator2.o `test -f 'CodeGen/CodeGenerator2.cc' || echo '$(srcdir)/'`CodeGen/CodeGenerator2.cc
    1033 @am__fastdepCXX_TRUE@   $(am__mv) CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Tpo CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Po
    1034 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='CodeGen/CodeGenerator2.cc' object='CodeGen/cfa_cpp-CodeGenerator2.o' libtool=no @AMDEPBACKSLASH@
    1035 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1036 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeGen/cfa_cpp-CodeGenerator2.o `test -f 'CodeGen/CodeGenerator2.cc' || echo '$(srcdir)/'`CodeGen/CodeGenerator2.cc
    1037 
    1038 CodeGen/cfa_cpp-CodeGenerator2.obj: CodeGen/CodeGenerator2.cc
    1039 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/cfa_cpp-CodeGenerator2.obj -MD -MP -MF CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Tpo -c -o CodeGen/cfa_cpp-CodeGenerator2.obj `if test -f 'CodeGen/CodeGenerator2.cc'; then $(CYGPATH_W) 'CodeGen/CodeGenerator2.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/CodeGenerator2.cc'; fi`
    1040 @am__fastdepCXX_TRUE@   $(am__mv) CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Tpo CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Po
    1041 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='CodeGen/CodeGenerator2.cc' object='CodeGen/cfa_cpp-CodeGenerator2.obj' libtool=no @AMDEPBACKSLASH@
    1042 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1043 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeGen/cfa_cpp-CodeGenerator2.obj `if test -f 'CodeGen/CodeGenerator2.cc'; then $(CYGPATH_W) 'CodeGen/CodeGenerator2.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/CodeGenerator2.cc'; fi`
     1031CodeGen/cfa_cpp-CodeGenerator.o: CodeGen/CodeGenerator.cc
     1032@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/cfa_cpp-CodeGenerator.o -MD -MP -MF CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Tpo -c -o CodeGen/cfa_cpp-CodeGenerator.o `test -f 'CodeGen/CodeGenerator.cc' || echo '$(srcdir)/'`CodeGen/CodeGenerator.cc
     1033@am__fastdepCXX_TRUE@   $(am__mv) CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Tpo CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Po
     1034@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='CodeGen/CodeGenerator.cc' object='CodeGen/cfa_cpp-CodeGenerator.o' libtool=no @AMDEPBACKSLASH@
     1035@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1036@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeGen/cfa_cpp-CodeGenerator.o `test -f 'CodeGen/CodeGenerator.cc' || echo '$(srcdir)/'`CodeGen/CodeGenerator.cc
     1037
     1038CodeGen/cfa_cpp-CodeGenerator.obj: CodeGen/CodeGenerator.cc
     1039@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/cfa_cpp-CodeGenerator.obj -MD -MP -MF CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Tpo -c -o CodeGen/cfa_cpp-CodeGenerator.obj `if test -f 'CodeGen/CodeGenerator.cc'; then $(CYGPATH_W) 'CodeGen/CodeGenerator.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/CodeGenerator.cc'; fi`
     1040@am__fastdepCXX_TRUE@   $(am__mv) CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Tpo CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Po
     1041@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='CodeGen/CodeGenerator.cc' object='CodeGen/cfa_cpp-CodeGenerator.obj' libtool=no @AMDEPBACKSLASH@
     1042@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1043@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeGen/cfa_cpp-CodeGenerator.obj `if test -f 'CodeGen/CodeGenerator.cc'; then $(CYGPATH_W) 'CodeGen/CodeGenerator.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/CodeGenerator.cc'; fi`
    10441044
    10451045CodeGen/cfa_cpp-GenType.o: CodeGen/GenType.cc
  • src/SynTree/Mutator.h

    rc3a4385 r4eb1db6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:12:28 2015
    13 // Update Count     : 3
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri May 29 16:34:08 2015
     13// Update Count     : 4
    1414//
    1515#include <cassert>
     
    104104                assert( newnode );
    105105                return newnode;
    106 ///         return tree->acceptMutator( mutator );
    107106        } else {
    108107                return 0;
  • src/SynTree/ObjectDecl.cc

    rc3a4385 r4eb1db6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:14:18 2015
    13 // Update Count     : 2
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Thu May 28 14:10:02 2015
     13// Update Count     : 8
    1414//
    1515
     
    6565
    6666void ObjectDecl::printShort( std::ostream &os, int indent ) const {
     67#if 0
     68        if ( get_mangleName() != "") {
     69                os << get_mangleName() << ": a ";
     70        } else
     71#endif
    6772        if ( get_name() != "" ) {
    6873                os << get_name() << ": a ";
  • src/SynTree/Statement.cc

    rc3a4385 r4eb1db6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 27 15:41:13 2015
    13 // Update Count     : 8
     12// Last Modified On : Tue Jun 02 13:07:09 2015
     13// Update Count     : 14
    1414//
    1515
     
    124124CaseStmt::~CaseStmt() {
    125125        delete condition;
     126}
     127
     128CaseStmt * CaseStmt::makeDefault( std::list<Label> labels, std::list<Statement *> branches ) {
     129        return new CaseStmt( labels, 0, branches, true );
    126130}
    127131
  • src/SynTree/Statement.h

    rc3a4385 r4eb1db6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 27 15:40:43 2015
    13 // Update Count     : 5
     12// Last Modified On : Tue Jun 02 13:07:25 2015
     13// Update Count     : 13
    1414//
    1515
     
    149149              std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
    150150        virtual ~CaseStmt();
     151
     152        static CaseStmt * makeDefault( std::list<Label> labels = std::list<Label>(),
     153                std::list<Statement *> stmts = std::list<Statement *>() );
    151154
    152155        bool isDefault() { return _isDefault; }
Note: See TracChangeset for help on using the changeset viewer.