- Timestamp:
- May 7, 2019, 2:36:10 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3c1fa71, b1d3ee1
- Parents:
- 9e6d652
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/BasicTypes-gen.cc
r9e6d652 r1c9568f0 1 #include <algorithm> 1 2 #include <queue> 2 3 #include <iostream> … … 340 341 } // for 341 342 code << "\t}; // costMatrix" << endl; 343 344 // maximum conversion cost from int 345 code << "\tstatic const int maxIntCost = " << *max_element(costMatrix[SignedInt], costMatrix[SignedInt] + NUMBER_OF_BASIC_TYPES) << ";" << endl; 342 346 code << "\t"; // indentation for end marker 343 347 344 348 if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ConversionCost ); 345 349 if ( (end = str.find( STARTMK, start + 1 )) == string::npos ) Abort( "start", ConversionCost ); -
src/ResolvExpr/ConversionCost.cc
r9e6d652 r1c9568f0 10 10 // Created On : Sun May 17 07:06:19 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 26 16:33:04201913 // Update Count : 2 412 // Last Modified On : Mon May 6 14:18:22 2019 13 // Update Count : 25 14 14 // 15 15 … … 249 249 /*_FLDXC*/ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, }, 250 250 }; // costMatrix 251 static const int maxIntCost = 15; 251 252 // GENERATED END 252 253 static_assert( … … 461 462 } // if 462 463 } else if ( dynamic_cast< PointerType* >( dest ) ) { 463 cost = Cost::safe; 464 cost = Cost::zero; 465 cost.incSafe( maxIntCost + 2 ); // +1 for zero_t -> int, +1 for disambiguation 464 466 } // if 465 467 }
Note: See TracChangeset
for help on using the changeset viewer.