Changeset e3282fe


Ignore:
Timestamp:
Nov 26, 2020, 7:31:23 PM (10 months ago)
Author:
Fangren Yu <f37yu@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
4432b52
Parents:
88a0ff6
Message:

optimize out some mangle calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r88a0ff6 re3282fe  
    16851685                // is unique.
    16861686                CandidateList satisfied;
    1687                 satisfyAssertions(candidate, localSyms, satisfied, errors);
     1687                bool needRecomputeKey = false;
     1688                if (candidate->need.empty()) {
     1689                        satisfied.emplace_back(candidate);
     1690                }
     1691                else {
     1692                        satisfyAssertions(candidate, localSyms, satisfied, errors);
     1693                        needRecomputeKey = true;
     1694                }
    16881695
    16891696                for (auto & newCand : satisfied) {
    16901697                        // recomputes type key, if satisfyAssertions changed it
     1698                        if (needRecomputeKey)
    16911699                        {
    16921700                                ast::ptr< ast::Type > newType = newCand->expr->result;
Note: See TracChangeset for help on using the changeset viewer.