Changeset 04cccaf


Ignore:
Timestamp:
Jul 13, 2018, 11:35:03 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
825170d
Parents:
d53772d
Message:

Terminate assertion resolution early if alternative has infinite cost

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    rd53772d r04cccaf  
    482482        template< typename ForwardIterator, typename OutputIterator >
    483483        void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out ) {
     484                if ( newAlt.cost == Cost::infinity ) return; // don't proceed down this dead end
    484485                if ( begin == end ) {
    485486                        if ( newNeed.empty() ) {
     
    11851186                                std::cerr << "bindings are:" << std::endl;
    11861187                                withFunc.env.print( std::cerr, 8 );
     1188                                std::cerr << "cost is: " << withFunc.cost << std::endl;
    11871189                                std::cerr << "cost of conversion is:" << cvtCost << std::endl;
    11881190                        )
Note: See TracChangeset for help on using the changeset viewer.