Changes in src/ResolvExpr/CastCost.cc [1521de20:543159b]
- File:
-
- 1 edited
-
src/ResolvExpr/CastCost.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cc
r1521de20 r543159b 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:45201513 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 06:59:10 2015 13 // Update Count : 2 14 14 // 15 15 … … 56 56 return Cost::infinity; 57 57 } else { 58 // xxx - why are we adding cost 0 here?59 58 return converter.get_cost() + Cost( 0, 0, 0 ); 60 59 } // if … … 83 82 newEnv.add( pointerType->get_forall() ); 84 83 newEnv.add( pointerType->get_base()->get_forall() ); 85 int castResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );86 if ( castResult > 0 ) {84 int assignResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer ); 85 if ( assignResult > 0 ) { 87 86 cost = Cost( 0, 0, 1 ); 88 } else if ( castResult < 0 ) {87 } else if ( assignResult < 0 ) { 89 88 cost = Cost( 1, 0, 0 ); 90 89 } // if
Note:
See TracChangeset
for help on using the changeset viewer.