Changeset 22cad76
- Timestamp:
- Jun 28, 2016, 5:28:45 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 66999e7
- Parents:
- 466149d
- git-author:
- Aaron Moss <a3moss@…> (06/27/16 16:36:52)
- git-committer:
- Aaron Moss <a3moss@…> (06/28/16 17:28:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r466149d r22cad76 411 411 } 412 412 413 /// Map of declaration s (intended to be the assertions in an AssertionSet) to their parents and the number of times they've been included414 typedef std::unordered_map< DeclarationWithType*, std::unordered_map< DeclarationWithType*, unsigned > > AssertionParentSet;413 /// Map of declaration uniqueIds (intended to be the assertions in an AssertionSet) to their parents and the number of times they've been included 414 typedef std::unordered_map< UniqueId, std::unordered_map< UniqueId, unsigned > > AssertionParentSet; 415 415 416 416 static const int recursionLimit = 10; ///< Limit to depth of recursion satisfaction … … 464 464 std::cerr << std::endl; 465 465 ) 466 AssertionParentSet newNeedParents( needParents );467 // skip repeatingly-self-recursive assertion satisfaction468 if ( newNeedParents[ curDecl ][ *candidate ]++ > recursionParentLimit ) return;469 466 470 467 AssertionSet newHave, newerNeed( newNeed ); … … 490 487 newerAlt.env = newEnv; 491 488 assert( (*candidate)->get_uniqueId() ); 492 Expression *varExpr = new VariableExpr( static_cast< DeclarationWithType* >( Declaration::declFromId( (*candidate)->get_uniqueId() ) ) ); 489 DeclarationWithType *candDecl = static_cast< DeclarationWithType* >( Declaration::declFromId( (*candidate)->get_uniqueId() ) ); 490 AssertionParentSet newNeedParents( needParents ); 491 // skip repeatingly-self-recursive assertion satisfaction 492 if ( newNeedParents[ curDecl->get_uniqueId() ][ candDecl->get_uniqueId() ]++ > recursionParentLimit ) continue; 493 Expression *varExpr = new VariableExpr( candDecl ); 493 494 deleteAll( varExpr->get_results() ); 494 495 varExpr->get_results().clear();
Note: See TracChangeset
for help on using the changeset viewer.