Ignore:
Timestamp:
Jan 29, 2019, 1:49:06 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
72514aa
Parents:
528ccc8 (diff), 8f99233 (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.
Message:

Merge branch 'jenkins-sandbox' of plg.uwaterloo.ca:software/cfa/cfa-cc into jenkins-sandbox

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r528ccc8 r692be4e  
    474474                }
    475475
    476                 // mark specialization cost of return types
    477                 for ( DeclarationWithType* returnVal : function->returnVals ) {
    478                         convCost.decSpec( specCost( returnVal->get_type() ) );
    479                 }
     476                // specialization cost of return types can't be accounted for directly, it disables
     477                // otherwise-identical calls, like this example based on auto-newline in the I/O lib:
     478                //
     479                //   forall(otype OS) {
     480                //     void ?|?(OS&, int);  // with newline
     481                //     OS&  ?|?(OS&, int);  // no newline, always chosen due to more specialization
     482                //   }
    480483
    481484                // mark type variable and specialization cost of forall clause
     
    483486                for ( TypeDecl* td : function->forall ) {
    484487                        convCost.decSpec( td->assertions.size() );
    485                 }
    486 
    487                 // xxx -- replace with new costs in resolver
    488                 for ( InferredParams::const_iterator assert = appExpr->inferParams.begin(); assert != appExpr->inferParams.end(); ++assert ) {
    489                         convCost += computeConversionCost( assert->second.actualType, assert->second.formalType, indexer, alt.env );
    490488                }
    491489
     
    12291227                                Alternative newAlt{
    12301228                                        restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ),
    1231                                         alt.env, openVars, needAssertions, alt.cost + thisCost, thisCost };
     1229                                        alt.env, openVars, needAssertions, alt.cost, alt.cost + thisCost };
    12321230                                inferParameters( newAlt, back_inserter( candidates ) );
    12331231                        } // if
Note: See TracChangeset for help on using the changeset viewer.