Changeset 6c4ff37 for src/CodeGen/CodeGenerator.h
- Timestamp:
- Jun 2, 2015, 11:51:22 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, 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, string, with_gc
- Children:
- 2b6c1e0
- Parents:
- 6db50d5
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.h
r6db50d5 r6c4ff37 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // CodeGenerator 2.h --7 // CodeGenerator.h -- 8 8 // 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:35:37201513 // Update Count : 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Jun 02 11:45:20 2015 13 // Update Count : 9 14 14 // 15 15 … … 25 25 26 26 namespace CodeGen { 27 class CodeGenerator 2: public Visitor {27 class CodeGenerator : public Visitor { 28 28 public: 29 29 static int tabsize; 30 30 31 CodeGenerator 2( std::ostream &os );32 CodeGenerator 2( std::ostream &os, std::string, int indent = 0, bool infun = false );33 CodeGenerator 2( std::ostream &os, char *, int indent = 0, bool infun = false );31 CodeGenerator( std::ostream &os ); 32 CodeGenerator( std::ostream &os, std::string, int indent = 0, bool infun = false ); 33 CodeGenerator( std::ostream &os, char *, int indent = 0, bool infun = false ); 34 34 35 CodeGenerator 2( CodeGenerator2& );35 CodeGenerator( CodeGenerator & ); 36 36 37 37 //*** Declaration … … 82 82 virtual void visit( DeclStmt * ); 83 83 84 std::string get_string( void );85 void add_string_left( std::string s ) { before << s; }86 void shift_left();87 84 template< class Iterator > void genCommaList( Iterator begin, Iterator end ); 88 85 private: 89 86 int cur_indent; 90 87 bool insideFunction; 91 std::ostream &before; 92 std::string after; 88 std::ostream &output; 93 89 94 90 static std::string printLabels ( std::list < Label > & ); … … 100 96 101 97 template< class Iterator > 102 void CodeGenerator 2::genCommaList( Iterator begin, Iterator end ) {98 void CodeGenerator::genCommaList( Iterator begin, Iterator end ) { 103 99 if ( begin == end ) return; 104 100 … … 106 102 (*begin++)->accept( *this ); 107 103 if ( begin == end ) return; 108 before<< ", ";104 output << ", "; 109 105 } // for 110 106 }
Note: See TracChangeset
for help on using the changeset viewer.