Changeset 24d6572 for src/ResolvExpr/CandidateFinder.cpp
- Timestamp:
- Jun 12, 2023, 2:45:32 PM (13 months ago)
- Branches:
- ast-experimental, master
- Children:
- 62d62db
- Parents:
- 34b4268 (diff), 251ce80 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r34b4268 r24d6572 23 23 #include <vector> 24 24 25 #include "AdjustExprType.hpp" 25 26 #include "Candidate.hpp" 26 27 #include "CompilationState.h" 27 28 #include "Cost.h" 29 #include "CastCost.hpp" 30 #include "PolyCost.hpp" 31 #include "SpecCost.hpp" 32 #include "ConversionCost.h" 28 33 #include "ExplodedArg.hpp" 29 34 #include "RenameVars.h" // for renameTyVars … … 403 408 unify( 404 409 ttype, argType, newResult.env, newResult.need, newResult.have, 405 newResult.open , symtab)410 newResult.open ) 406 411 ) { 407 412 finalResults.emplace_back( std::move( newResult ) ); … … 474 479 ) 475 480 476 if ( unify( paramType, argType, env, need, have, open , symtab) ) {481 if ( unify( paramType, argType, env, need, have, open ) ) { 477 482 unsigned nextExpl = results[i].nextExpl + 1; 478 483 if ( nextExpl == expl.exprs.size() ) { nextExpl = 0; } … … 493 498 ast::OpenVarSet open = results[i].open; 494 499 495 if ( unify( paramType, cnst->result, env, need, have, open , symtab) ) {500 if ( unify( paramType, cnst->result, env, need, have, open ) ) { 496 501 results.emplace_back( 497 502 i, new ast::DefaultArgExpr{ cnst->location, cnst }, std::move( env ), … … 536 541 537 542 // attempt to unify types 538 if ( unify( paramType, argType, env, need, have, open , symtab) ) {543 if ( unify( paramType, argType, env, need, have, open ) ) { 539 544 // add new result 540 545 results.emplace_back( … … 703 708 if ( selfFinder.strictMode ) { 704 709 if ( ! unifyExact( 705 returnType, targetType, funcEnv, funcNeed, funcHave, funcOpen, noWiden() , symtab) // xxx - is no widening correct?710 returnType, targetType, funcEnv, funcNeed, funcHave, funcOpen, noWiden() ) // xxx - is no widening correct? 706 711 ) { 707 712 // unification failed, do not pursue this candidate … … 711 716 else { 712 717 if ( ! unify( 713 returnType, targetType, funcEnv, funcNeed, funcHave, funcOpen , symtab)718 returnType, targetType, funcEnv, funcNeed, funcHave, funcOpen ) 714 719 ) { 715 720 // unification failed, do not pursue this candidate … … 1156 1161 1157 1162 // unification run for side-effects 1158 unify( toType, cand->expr->result, cand->env, need, have, open , symtab);1163 unify( toType, cand->expr->result, cand->env, need, have, open ); 1159 1164 Cost thisCost = 1160 1165 (castExpr->isGenerated == ast::GeneratedFlag::GeneratedCast) … … 1497 1502 if ( 1498 1503 unify( 1499 r2->expr->result, r3->expr->result, env, need, have, open, symtab,1504 r2->expr->result, r3->expr->result, env, need, have, open, 1500 1505 common ) 1501 1506 ) { … … 1571 1576 if ( 1572 1577 unify( 1573 r1->expr->result, r2->expr->result, env, need, have, open, symtab,1578 r1->expr->result, r2->expr->result, env, need, have, open, 1574 1579 common ) 1575 1580 ) { … … 1677 1682 1678 1683 // unification run for side-effects 1679 bool canUnify = unify( toType, cand->expr->result, env, need, have, open , symtab);1684 bool canUnify = unify( toType, cand->expr->result, env, need, have, open ); 1680 1685 (void) canUnify; 1681 1686 Cost thisCost = computeConversionCost( cand->expr->result, toType, cand->expr->get_lvalue(),
Note: See TracChangeset
for help on using the changeset viewer.