- File:
-
- 1 edited
-
src/ResolvExpr/CandidateFinder.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
rfc1a3e2 reb7586e 906 906 } 907 907 CandidateRef & choice = winners.front(); 908 choice->cost.inc Var();908 choice->cost.incSafe(); 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 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 ); 1385 1388 CandidateRef newCand = std::make_shared<Candidate>( 1386 newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe:Cost::zero,1389 newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, Cost::zero, 1387 1390 cost ); 1388 1389 1391 if (newCand->expr->env) { 1390 1392 newCand->env.add(*newCand->expr->env); … … 1829 1831 Cost cost = Cost::zero; 1830 1832 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, cost 1837 // ); 1831 1838 CandidateRef newCand = 1832 1839 std::make_shared<Candidate>( 1833 1840 newExpr, copy( tenv ), ast::OpenVarSet{}, 1834 ast::AssertionSet{}, Cost:: safe, cost1841 ast::AssertionSet{}, Cost::zero, cost 1835 1842 ); 1836 1837 1843 if (newCand->expr->env) { 1838 1844 newCand->env.add(*newCand->expr->env);
Note:
See TracChangeset
for help on using the changeset viewer.