Changes in src/CodeGen/CodeGenerator.cc [daf1af8:7e003011]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rdaf1af8 r7e003011 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Jun 8 16:00:00 201713 // Update Count : 48 512 // Last Modified On : Wed May 10 14:45:00 2017 13 // Update Count : 484 14 14 // 15 15 … … 112 112 113 113 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 } 114 124 115 125 string CodeGenerator::mangleName( DeclarationWithType * decl ) { … … 908 918 } 909 919 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 926 920 void CodeGenerator::visit( WhileStmt * whileStmt ) { 927 921 if ( whileStmt->get_isDoWhile() ) {
Note:
See TracChangeset
for help on using the changeset viewer.