Changeset 6ce67ce for src/ResolvExpr
- Timestamp:
- Feb 23, 2016, 11:05:11 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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:
- 3be261a, a172972, b502055
- Parents:
- 6ed1d4b (diff), 4318107 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cc
r6ed1d4b r6ce67ce 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 06:57:43 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon Oct 05 14:48:45 201513 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Feb 2 15:34:36 2016 13 // Update Count : 7 14 14 // 15 15 … … 69 69 PointerType *destAsPointer = dynamic_cast< PointerType* >( dest ); 70 70 if ( destAsPointer && basicType->isInteger() ) { 71 cost = Cost( 1, 0, 0 ); 71 //cost = Cost( 1, 0, 0 ); 72 cost = Cost::infinity; 72 73 } else { 73 74 ConversionCost::visit( basicType ); … … 87 88 cost = Cost( 0, 0, 1 ); 88 89 } else if ( castResult < 0 ) { 89 cost = Cost( 1, 0, 0 ); 90 cost = Cost::infinity; 91 //cost = Cost( 1, 0, 0 ); 90 92 } // if 91 93 } // if 92 94 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) { 93 95 if ( destAsBasic->isInteger() ) { 94 cost = Cost( 1, 0, 0 ); 96 //cost = Cost( 1, 0, 0 ); 97 cost = Cost::infinity; 95 98 } // if 96 99 } -
src/ResolvExpr/Resolver.cc
r6ed1d4b r6ce67ce 10 10 // Created On : Sun May 17 12:17:01 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 24 17:33:54 201513 // Update Count : 17 812 // Last Modified On : Tue Feb 9 21:57:52 2016 13 // Update Count : 179 14 14 // 15 15 … … 322 322 BasicType::SignedInt); 323 323 } else { 324 DeclarationWithType * decl = lookupId( n);324 DeclarationWithType * decl = lookupId( n ); 325 325 initContext = decl->get_type(); 326 326 } … … 344 344 if ( PointerType * pt = dynamic_cast< PointerType *>( newExpr->get_results().front() ) ) { 345 345 if ( isCharType( pt->get_base() ) ) { 346 // strip cast if we're initializing a char[] with a char *, e.g. 347 // char x[] = "hello"; 346 // strip cast if we're initializing a char[] with a char *, e.g. char x[] = "hello"; 348 347 CastExpr *ce = dynamic_cast< CastExpr * >( newExpr ); 349 348 singleInit->set_value( ce->get_arg() );
Note: See TracChangeset
for help on using the changeset viewer.