Changeset f28a53a for src/ResolvExpr/CastCost.cc
- Timestamp:
- Oct 7, 2015, 12:42:10 PM (7 years ago)
- Branches:
- 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, resolv-new, string, with_gc
- Children:
- 0800284, 50eac1b
- Parents:
- 59cde21 (diff), 1521de2 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cc
r59cde21 rf28a53a 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 06:57:43 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sun May 17 06:59:10201513 // Update Count : 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon Oct 05 14:48:45 2015 13 // Update Count : 5 14 14 // 15 15 … … 56 56 return Cost::infinity; 57 57 } else { 58 // xxx - why are we adding cost 0 here? 58 59 return converter.get_cost() + Cost( 0, 0, 0 ); 59 60 } // if … … 82 83 newEnv.add( pointerType->get_forall() ); 83 84 newEnv.add( pointerType->get_base()->get_forall() ); 84 int assignResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );85 if ( assignResult > 0 ) {85 int castResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer ); 86 if ( castResult > 0 ) { 86 87 cost = Cost( 0, 0, 1 ); 87 } else if ( assignResult < 0 ) {88 } else if ( castResult < 0 ) { 88 89 cost = Cost( 1, 0, 0 ); 89 90 } // if
Note: See TracChangeset
for help on using the changeset viewer.