@@ -381,18 +381,16 @@ impl PathsToNested {
381381/// The nested goals of each stack entry and the path from the
382382/// stack entry to that nested goal.
383383///
384+ /// They are used when checking whether reevaluating a global cache
385+ /// would encounter a cycle or use a provisional cache entry given the
386+ /// currentl search graph state. We need to disable the global cache
387+ /// in this case as it could otherwise result in behaviorial differences.
388+ /// Cycles can impact behavior. The cycle ABA may have different final
389+ /// results from a the cycle BAB depending on the cycle root.
390+ ///
384391/// We only start tracking nested goals once we've either encountered
385392/// overflow or a solver cycle. This is a performance optimization to
386393/// avoid tracking nested goals on the happy path.
387- ///
388- /// We use nested goals for two reasons:
389- /// - when rebasing provisional cache entries
390- /// - when checking whether we have to ignore a global cache entry as reevaluating
391- /// it would encounter a cycle or use a provisional cache entry.
392- ///
393- /// We need to disable the global cache if using it would hide a cycle, as
394- /// cycles can impact behavior. The cycle ABA may have different final
395- /// results from a the cycle BAB depending on the cycle root.
396394#[ derive_where( Debug , Default , Clone ; X : Cx ) ]
397395struct NestedGoals < X : Cx > {
398396 nested_goals : HashMap < X :: Input , PathsToNested > ,
0 commit comments