- File:
-
- 1 edited
-
src/ResolvExpr/CandidateFinder.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
reb7586e rfc1a3e2 906 906 } 907 907 CandidateRef & choice = winners.front(); 908 choice->cost.inc Safe();908 choice->cost.incVar(); 909 909 candidates.emplace_back( std::move(choice) ); 910 910 } … … 1376 1376 ast::Expr * newExpr = data.combine( nameExpr->location, cost ); 1377 1377 1378 // bool bentConversion = false; 1379 // if ( auto inst = newExpr->result.as<ast::EnumInstType>() ) { 1380 // if ( inst->base && inst->base->base ) { 1381 // bentConversion = true; 1382 // } 1383 // } 1384 1385 // CandidateRef newCand = std::make_shared<Candidate>( 1386 // newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe: Cost::zero, 1387 // cost ); 1378 bool bentConversion = false; 1379 if ( auto inst = newExpr->result.as<ast::EnumInstType>() ) { 1380 if ( inst->base && inst->base->base ) { 1381 bentConversion = true; 1382 } 1383 } 1384 1388 1385 CandidateRef newCand = std::make_shared<Candidate>( 1389 newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, Cost::zero,1386 newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe: Cost::zero, 1390 1387 cost ); 1388 1391 1389 if (newCand->expr->env) { 1392 1390 newCand->env.add(*newCand->expr->env); … … 1831 1829 Cost cost = Cost::zero; 1832 1830 ast::Expr * newExpr = data.combine( expr->location, cost ); 1833 // CandidateRef newCand =1834 // std::make_shared<Candidate>(1835 // newExpr, copy( tenv ), ast::OpenVarSet{},1836 // ast::AssertionSet{}, Cost::safe, cost1837 // );1838 1831 CandidateRef newCand = 1839 1832 std::make_shared<Candidate>( 1840 1833 newExpr, copy( tenv ), ast::OpenVarSet{}, 1841 ast::AssertionSet{}, Cost:: zero, cost1834 ast::AssertionSet{}, Cost::safe, cost 1842 1835 ); 1836 1843 1837 if (newCand->expr->env) { 1844 1838 newCand->env.add(*newCand->expr->env);
Note:
See TracChangeset
for help on using the changeset viewer.