Changeset 7d01cf44 for src/ResolvExpr/AlternativeFinder.cc
- Timestamp:
- Aug 12, 2019, 1:47:37 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 14388c1, e0bd0f9
- Parents:
- 4f5a8a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r4f5a8a2 r7d01cf44 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:52:08 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 25 22:37:46201913 // Update Count : 3 711 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Aug 8 16:35:00 2019 13 // Update Count : 38 14 14 // 15 15 … … 377 377 } 378 378 379 Cost computeConversionCost( Type * actualType, Type * formalType, const SymTab::Indexer &indexer, const TypeEnvironment & env ) { 379 Cost computeConversionCost( Type * actualType, Type * formalType, bool actualIsLvalue, 380 const SymTab::Indexer &indexer, const TypeEnvironment & env ) { 380 381 PRINT( 381 382 std::cerr << std::endl << "converting "; … … 387 388 std::cerr << std::endl; 388 389 ) 389 Cost convCost = conversionCost( actualType, formalType, indexer, env );390 Cost convCost = conversionCost( actualType, formalType, actualIsLvalue, indexer, env ); 390 391 PRINT( 391 392 std::cerr << std::endl << "cost is " << convCost << std::endl; … … 402 403 403 404 Cost computeExpressionConversionCost( Expression *& actualExpr, Type * formalType, const SymTab::Indexer &indexer, const TypeEnvironment & env ) { 404 Cost convCost = computeConversionCost( actualExpr->result, formalType, indexer, env ); 405 Cost convCost = computeConversionCost( 406 actualExpr->result, formalType, actualExpr->get_lvalue(), indexer, env ); 405 407 406 408 // if there is a non-zero conversion cost, ignoring poly cost, then the expression requires conversion. … … 1212 1214 unify( castExpr->result, alt.expr->result, alt.env, needAssertions, 1213 1215 haveAssertions, openVars, indexer ); 1214 Cost thisCost = castCost( alt.expr->result, castExpr->result, indexer,1215 alt.env );1216 Cost thisCost = castCost( alt.expr->result, castExpr->result, alt.expr->get_lvalue(), 1217 indexer, alt.env ); 1216 1218 PRINT( 1217 1219 std::cerr << "working on cast with result: " << castExpr->result << std::endl; … … 1640 1642 // xxx - do some inspecting on this line... why isn't result bound to initAlt.type? 1641 1643 1642 Cost thisCost = castCost( alt.expr->result, toType, indexer, newEnv ); 1644 Cost thisCost = castCost( alt.expr->result, toType, alt.expr->get_lvalue(), 1645 indexer, newEnv ); 1643 1646 if ( thisCost != Cost::infinity ) { 1644 1647 // count one safe conversion for each value that is thrown away
Note: See TracChangeset
for help on using the changeset viewer.