Changes in / [c3a4385:4eb1db6]
- Location:
- src
- Files:
-
- 2 added
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/GenType.cc
rc3a4385 r4eb1db6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 23:38:22201513 // Update Count : 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Jun 02 11:07:25 2015 13 // Update Count : 3 14 14 // 15 15 … … 18 18 19 19 #include "GenType.h" 20 #include "CodeGenerator 2.h"20 #include "CodeGenerator.h" 21 21 #include "SynTree/Visitor.h" 22 22 #include "SynTree/Type.h" … … 97 97 } // if 98 98 if ( dimension != 0 ) { 99 CodeGenerator 2cg( os );99 CodeGenerator cg( os ); 100 100 dimension->accept( cg ); 101 101 } // if … … 148 148 } // if 149 149 } else { 150 CodeGenerator 2cg( os );150 CodeGenerator cg( os ); 151 151 os << "(" ; 152 152 -
src/CodeGen/Generate.cc
rc3a4385 r4eb1db6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 23:39:24 201513 // Update Count : 111 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Jun 02 11:08:44 2015 13 // Update Count : 4 14 14 // 15 15 … … 22 22 #include "SynTree/Declaration.h" 23 23 24 #include "CodeGenerator 2.h"24 #include "CodeGenerator.h" 25 25 26 26 using namespace std; … … 28 28 namespace CodeGen { 29 29 void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ) { 30 CodeGen::CodeGenerator 2cgv( os );30 CodeGen::CodeGenerator cgv( os ); 31 31 32 32 for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end(); i++ ) { 33 33 if ( LinkageSpec::isGeneratable( (*i)->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( (*i)->get_linkage() ) ) ) { 34 34 (*i)->accept(cgv); 35 cgv.shift_left();36 35 if ( doSemicolon( *i ) ) { 37 36 os << ";"; -
src/CodeGen/module.mk
rc3a4385 r4eb1db6 19 19 20 20 SRC += CodeGen/Generate.cc \ 21 CodeGen/CodeGenerator 2.cc \21 CodeGen/CodeGenerator.cc \ 22 22 CodeGen/GenType.cc \ 23 23 CodeGen/FixNames.cc \ -
src/Common/utility.h
rc3a4385 r4eb1db6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue May 19 15:34:57201513 // Update Count : 311 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 29 16:17:02 2015 13 // Update Count : 7 14 14 // 15 15 … … 198 198 } 199 199 200 // it's nice to actually be able to increment iterators by an arbitrary amount 201 template< typename Iterator > 202 Iterator operator+(Iterator i, int inc) { 203 while ( inc > 0 ) { 204 ++i; 205 --inc; 206 } 207 return i; 208 } 209 200 210 #endif // _UTILITY_H 201 211 -
src/ControlStruct/LabelFixer.cc
rc3a4385 r4eb1db6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed May 27 16:16:14201513 // Update Count : 412 // Last Modified On : Fri May 29 15:57:12 2015 13 // Update Count : 82 14 14 // 15 15 … … 23 23 #include "utility.h" 24 24 25 #include <iostream> 26 25 27 namespace ControlStruct { 26 LabelFixer::Entry::Entry( Statement *to, Statement *from ) : definition ( to ) {28 LabelFixer::Entry::Entry( Statement *to, BranchStmt *from ) : definition ( to ) { 27 29 if ( from != 0 ) 28 30 usage.push_back( from ); … … 31 33 bool LabelFixer::Entry::insideLoop() { 32 34 return ( dynamic_cast< ForStmt * > ( definition ) || 33 35 dynamic_cast< WhileStmt * > ( definition ) ); 34 36 } 35 37 … … 46 48 } 47 49 50 // prune to at most one label definition for each statement 48 51 void LabelFixer::visit( Statement *stmt ) { 49 52 std::list< Label > &labels = stmt->get_labels(); 50 53 51 54 if ( ! labels.empty() ) { 55 // only remember one label for each statement 52 56 Label current = setLabelsDef( labels, stmt ); 53 57 labels.clear(); … … 57 61 58 62 void LabelFixer::visit( BranchStmt *branchStmt ) { 59 visit ( ( Statement * )branchStmt ); // the labels this statement might have63 visit ( ( Statement * )branchStmt ); 60 64 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 != "" ) { 63 68 setLabelsUsg( target, branchStmt ); 64 } //else /* computed goto or normal exit-loop statements */69 } 65 70 } 66 71 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 67 74 Label LabelFixer::setLabelsDef( std::list< Label > &llabel, Statement *definition ) { 68 75 assert( definition != 0 ); 69 Entry *entry = new Entry( definition ); 70 bool used = false; 76 assert( llabel.size() > 0 ); 71 77 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 80 90 81 if ( ! used ) delete entry;82 83 return labelTable[ llabel.front() ]->get_label(); // this *must* exist91 // 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(); 84 94 } 85 95 86 Label LabelFixer::setLabelsUsg( Label orgValue, Statement *use ) { 96 // Remember all uses of a label. 97 void LabelFixer::setLabelsUsg( Label orgValue, BranchStmt *use ) { 87 98 assert( use != 0 ); 88 99 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 { 92 104 labelTable[ orgValue ] = new Entry( 0, use ); 93 94 return labelTable[ orgValue ]->get_label(); 105 } 95 106 } 96 107 108 // Ultimately builds a table that maps a label to its defining statement. 109 // In the process, 97 110 std::map<Label, Statement * > *LabelFixer::resolveJumps() throw ( SemanticError ) { 98 111 std::map< Statement *, Entry * > def_us; 99 112 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 ) { 101 115 Entry *e = i->second; 102 116 103 117 if ( def_us.find ( e->get_definition() ) == def_us.end() ) { 104 118 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() ); 108 121 } 109 122 } 110 123 111 // get rid of labelTable112 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 ) { 113 126 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(); 117 129 130 // no label definition found 118 131 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(); 123 133 throw SemanticError ( "'" + undef + "' label not defined"); 124 134 } 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 ); 125 140 126 141 to->get_labels().clear(); 127 142 to->get_labels().push_back( finalLabel ); 128 143 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 ); 133 149 } // for 134 150 } // for 135 151 136 // reverse table152 // create a table where each label maps to its defining statement 137 153 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 ) { 139 155 (*ret)[ (*i).second->get_label() ] = (*i).first; 156 } 140 157 141 158 return ret; -
src/ControlStruct/LabelFixer.h
rc3a4385 r4eb1db6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue May 26 12:55:10201513 // Update Count : 412 // Last Modified On : Fri May 29 15:25:55 2015 13 // Update Count : 11 14 14 // 15 15 … … 55 55 56 56 Label setLabelsDef( std::list< Label > &, Statement *definition ); 57 Label setLabelsUsg( Label, Statement *usage = 0 );57 void setLabelsUsg( Label, BranchStmt *usage = 0 ); 58 58 59 59 private: 60 60 class Entry { 61 61 public: 62 Entry( Statement *to = 0, Statement *from = 0 );62 Entry( Statement *to = 0, BranchStmt *from = 0 ); 63 63 bool used() { return ( usage.empty() ); } 64 64 bool defined() { return ( definition != 0 ); } … … 71 71 void set_definition( Statement *def ) { definition = def; } 72 72 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() ); } 76 76 private: 77 77 Label label; 78 78 Statement *definition; 79 std::list< Statement *> usage;79 std::list<BranchStmt *> usage; 80 80 }; 81 81 -
src/ControlStruct/MLEMutator.cc
rc3a4385 r4eb1db6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed May 27 16:19:32201513 // Update Count : 4412 // Last Modified On : Tue Jun 02 13:43:01 2015 13 // Update Count : 92 14 14 // 15 15 … … 33 33 } // if 34 34 35 // a child statement may set the break label 36 // - if they do, attach it to the next statement 35 37 std::list< Statement * > &kids = cmpndStmt->get_kids(); 36 38 for ( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) { … … 38 40 39 41 if ( ! get_breakLabel().empty() ) { 40 std::list< Statement * >::iterator next = k ; next++;42 std::list< Statement * >::iterator next = k+1; 41 43 if ( next == kids.end() ) { 42 44 std::list<Label> ls; ls.push_back( get_breakLabel() ); … … 58 60 } // if 59 61 60 //mutateAll( cmpndStmt->get_kids(), *this );61 62 return cmpndStmt; 62 63 } … … 76 77 Statement *MLEMutator::mutate( ForStmt *forStmt ) { 77 78 enclosingLoops.push_back( Entry( forStmt ) ); 78 maybeMutate( forStmt->get_body(), *this);79 forStmt->set_body( maybeMutate( forStmt->get_body(), *this ) ); 79 80 80 81 Entry &e = enclosingLoops.back(); … … 154 155 Label brkLabel = generator->newLabel(); 155 156 enclosingSwitches.push_back( Entry(switchStmt, "", brkLabel) ); 156 mutateAll( switchStmt->get_branches(), mutator ); { 157 mutateAll( switchStmt->get_branches(), mutator ); 158 { 157 159 // 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); 160 173 } 161 174 assert ( enclosingSwitches.back() == switchStmt ); … … 173 186 174 187 Statement *MLEMutator::mutateLoop( Statement *bodyLoop, Entry &e ) { 188 // ensure loop body is a block 175 189 CompoundStmt *newBody; 176 190 if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) { … … 204 218 } 205 219 206 //*** Entry's methods 220 //*** Entry's methods - ensure these labels can be set at most once 207 221 void MLEMutator::Entry::set_contExit( Label l ) { 208 222 assert ( contExit == "" || contExit == l ); -
src/Makefile.in
rc3a4385 r4eb1db6 98 98 am__objects_1 = cfa_cpp-main.$(OBJEXT) cfa_cpp-MakeLibCfa.$(OBJEXT) \ 99 99 CodeGen/cfa_cpp-Generate.$(OBJEXT) \ 100 CodeGen/cfa_cpp-CodeGenerator 2.$(OBJEXT) \100 CodeGen/cfa_cpp-CodeGenerator.$(OBJEXT) \ 101 101 CodeGen/cfa_cpp-GenType.$(OBJEXT) \ 102 102 CodeGen/cfa_cpp-FixNames.$(OBJEXT) \ … … 335 335 AUTOMAKE_OPTIONS = subdir-objects 336 336 SRC = main.cc MakeLibCfa.cc CodeGen/Generate.cc \ 337 CodeGen/CodeGenerator 2.cc CodeGen/GenType.cc \337 CodeGen/CodeGenerator.cc CodeGen/GenType.cc \ 338 338 CodeGen/FixNames.cc CodeGen/OperatorTable.cc \ 339 339 Common/SemanticError.cc Common/UniqueName.cc \ … … 475 475 CodeGen/cfa_cpp-Generate.$(OBJEXT): CodeGen/$(am__dirstamp) \ 476 476 CodeGen/$(DEPDIR)/$(am__dirstamp) 477 CodeGen/cfa_cpp-CodeGenerator 2.$(OBJEXT): CodeGen/$(am__dirstamp) \477 CodeGen/cfa_cpp-CodeGenerator.$(OBJEXT): CodeGen/$(am__dirstamp) \ 478 478 CodeGen/$(DEPDIR)/$(am__dirstamp) 479 479 CodeGen/cfa_cpp-GenType.$(OBJEXT): CodeGen/$(am__dirstamp) \ … … 760 760 mostlyclean-compile: 761 761 -rm -f *.$(OBJEXT) 762 -rm -f CodeGen/cfa_cpp-CodeGenerator 2.$(OBJEXT)762 -rm -f CodeGen/cfa_cpp-CodeGenerator.$(OBJEXT) 763 763 -rm -f CodeGen/cfa_cpp-FixNames.$(OBJEXT) 764 764 -rm -f CodeGen/cfa_cpp-GenType.$(OBJEXT) … … 868 868 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfa_cpp-MakeLibCfa.Po@am__quote@ 869 869 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfa_cpp-main.Po@am__quote@ 870 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator 2.Po@am__quote@870 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator.Po@am__quote@ 871 871 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-FixNames.Po@am__quote@ 872 872 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/cfa_cpp-GenType.Po@am__quote@ … … 1029 1029 @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` 1030 1030 1031 CodeGen/cfa_cpp-CodeGenerator 2.o: CodeGen/CodeGenerator2.cc1032 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/cfa_cpp-CodeGenerator 2.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.cc1033 @am__fastdepCXX_TRUE@ $(am__mv) CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator 2.Tpo CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Po1034 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CodeGen/CodeGenerator 2.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-CodeGenerator 2.o `test -f 'CodeGen/CodeGenerator2.cc' || echo '$(srcdir)/'`CodeGen/CodeGenerator2.cc1037 1038 CodeGen/cfa_cpp-CodeGenerator 2.obj: CodeGen/CodeGenerator2.cc1039 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/cfa_cpp-CodeGenerator 2.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-CodeGenerator 2.Tpo CodeGen/$(DEPDIR)/cfa_cpp-CodeGenerator2.Po1041 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CodeGen/CodeGenerator 2.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-CodeGenerator 2.obj `if test -f 'CodeGen/CodeGenerator2.cc'; then $(CYGPATH_W) 'CodeGen/CodeGenerator2.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/CodeGenerator2.cc'; fi`1031 CodeGen/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 1038 CodeGen/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` 1044 1044 1045 1045 CodeGen/cfa_cpp-GenType.o: CodeGen/GenType.cc -
src/SynTree/Mutator.h
rc3a4385 r4eb1db6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 10:12:28 201513 // Update Count : 311 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 29 16:34:08 2015 13 // Update Count : 4 14 14 // 15 15 #include <cassert> … … 104 104 assert( newnode ); 105 105 return newnode; 106 /// return tree->acceptMutator( mutator );107 106 } else { 108 107 return 0; -
src/SynTree/ObjectDecl.cc
rc3a4385 r4eb1db6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 10:14:18201513 // Update Count : 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu May 28 14:10:02 2015 13 // Update Count : 8 14 14 // 15 15 … … 65 65 66 66 void ObjectDecl::printShort( std::ostream &os, int indent ) const { 67 #if 0 68 if ( get_mangleName() != "") { 69 os << get_mangleName() << ": a "; 70 } else 71 #endif 67 72 if ( get_name() != "" ) { 68 73 os << get_name() << ": a "; -
src/SynTree/Statement.cc
rc3a4385 r4eb1db6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed May 27 15:41:13201513 // Update Count : 812 // Last Modified On : Tue Jun 02 13:07:09 2015 13 // Update Count : 14 14 14 // 15 15 … … 124 124 CaseStmt::~CaseStmt() { 125 125 delete condition; 126 } 127 128 CaseStmt * CaseStmt::makeDefault( std::list<Label> labels, std::list<Statement *> branches ) { 129 return new CaseStmt( labels, 0, branches, true ); 126 130 } 127 131 -
src/SynTree/Statement.h
rc3a4385 r4eb1db6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed May 27 15:40:43201513 // Update Count : 512 // Last Modified On : Tue Jun 02 13:07:25 2015 13 // Update Count : 13 14 14 // 15 15 … … 149 149 std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError); 150 150 virtual ~CaseStmt(); 151 152 static CaseStmt * makeDefault( std::list<Label> labels = std::list<Label>(), 153 std::list<Statement *> stmts = std::list<Statement *>() ); 151 154 152 155 bool isDefault() { return _isDefault; }
Note: See TracChangeset
for help on using the changeset viewer.