@@ -351,15 +351,16 @@ func (ctx *overlayContext) initCloneCC(x *closeContext) {
351
351
o .Patterns = append (o .Patterns , x .Patterns ... )
352
352
353
353
// needsCloseInSchedule is a separate mechanism to signal nodes that have
354
- // completed. Do not signal such nodes if they are outside the current
355
- // copied graph.
356
- if cx := x .needsCloseInSchedule ; cx != nil {
357
- if cx .src ._cc .overlay == nil {
358
- o .needsCloseInSchedule = nil
359
- } else {
360
- // TODO: Debug assert: cx.overlay != nil
361
- o .needsCloseInSchedule = ctx .allocCC (cx )
362
- }
354
+ // completed that corresponds to the EVAL mechanism. Since we have not
355
+ // processed the conjuncts yet, these are inherently initiated outside of
356
+ // this conjunct. By now, if a closeContext needs to remain open, other
357
+ // counters should have been added. As an example, the parent node of this
358
+ // disjunct is still processing. The disjunction will be fully added before
359
+ // processing, and thus their will be no direct EVAL dependency. However,
360
+ // this disjunct may depend on a NOTIFY that is kept open by an ancestor
361
+ // EVAL.
362
+ if x .needsCloseInSchedule != nil {
363
+ o .needsCloseInSchedule = nil
363
364
}
364
365
365
366
// child and next always point to completed closeContexts. Moreover, only
@@ -467,6 +468,13 @@ func (ctx *overlayContext) finishDependencies(x *closeContext) {
467
468
continue
468
469
}
469
470
471
+ // Since have not started processing the disjunct yet, all EVAL
472
+ // dependencies will have been initiated outside of this disjunct.
473
+ if d .kind == EVAL {
474
+ o .decDependentNoMatch (ctx .ctx , EVAL , nil )
475
+ continue
476
+ }
477
+
470
478
if d .dependency .overlay == nil {
471
479
// This dependency is irrelevant for the current overlay. We can
472
480
// eliminate it as long as we decrement the accompanying counter.
0 commit comments