Changeset ac911f4
- Timestamp:
- Jul 30, 2016, 11:37:26 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 3778cb2
- Parents:
- 66d12f7
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/CodeGen/CodeGenerator.cc ¶
r66d12f7 rac911f4 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 30 01:48:20201613 // Update Count : 3 2912 // Last Modified On : Sat Jul 30 11:27:07 2016 13 // Update Count : 340 14 14 // 15 15 … … 473 473 } else { 474 474 if ( nameExpr->get_name() != "Range" ) { 475 // builtin routines 475 476 nameExpr->accept( *this ); 476 477 output << "("; … … 478 479 output << ")"; 479 480 } else { 480 genFredList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() ); 481 // output << (*(untypedExpr->get_args().begin()))->accept( *this );// << " ... " << (*untypedExpr->get_args().end())->accept( *this ).getname(); 481 // case V1 ... V2 or case V1~V2 482 assert( untypedExpr->get_args().size() == 2 ); 483 (*untypedExpr->get_args().begin())->accept( *this ); 484 output << " ... "; 485 (*--untypedExpr->get_args().end())->accept( *this ); 482 486 } // if 483 487 } // if -
TabularUnified src/CodeGen/CodeGenerator.h ¶
r66d12f7 rac911f4 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 30 01:23:43201613 // Update Count : 3 612 // Last Modified On : Sat Jul 30 11:10:42 2016 13 // Update Count : 37 14 14 // 15 15 … … 90 90 91 91 template< class Iterator > void genCommaList( Iterator begin, Iterator end ); 92 template< class Iterator > void genFredList( Iterator begin, Iterator end );93 92 94 93 struct Indenter { … … 132 131 } 133 132 134 template< class Iterator >135 void CodeGenerator::genFredList( Iterator begin, Iterator end ) {136 if ( begin == end ) return;137 138 for ( ;; ) {139 (*begin++)->accept( *this );140 if ( begin == end ) return;141 output << " ... ";142 } // for143 }144 145 133 inline bool doSemicolon( Declaration* decl ) { 146 134 if ( FunctionDecl* func = dynamic_cast< FunctionDecl* >( decl ) ) { -
TabularUnified src/tests/switch.c ¶
r66d12f7 rac911f4 10 10 // Created On : Tue Jul 12 06:50:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 18:02:23 201613 // Update Count : 2 212 // Last Modified On : Sat Jul 30 11:31:13 2016 13 // Update Count : 28 14 14 // 15 15 … … 49 49 default: 50 50 i = 3; 51 case 3:51 case 19: 52 52 case 'A' ... 'Z': 53 case 5... 6:54 case 2 , 4:53 case 1 ... 6: 54 case 20, 30: 55 55 j = 3; 56 56 f( 3 ); … … 78 78 struct S { int i; }; 79 79 S s; 80 case 3:80 case 19: 81 81 case 'A' ... 'Z': 82 case 5... 6:83 case 2 , 4, 7:82 case 0 ... 6: 83 case 20, 30, 40: 84 84 i = 3; 85 85 f( 3 );
Note: See TracChangeset
for help on using the changeset viewer.