This implements an approach to the reentrancy invariant described in https://github.com/tc39/proposal-defer-import-eval/issues/38, in implementing a ValidateSyncExecution routine that runs before the sync evaluation call and checks for any states in the graph associated with reentrancy to skip sync execution in that case.
This would permit the case as described in #38 since it is dealing with disjoint graphs. It is only when the unexecuted parts of the graph overlaps with an in-progress execution that execution would be skipped.
An alternative to skipping execution could still be to throw a reference error.
This implements an approach to the reentrancy invariant described in https://github.com/tc39/proposal-defer-import-eval/issues/38, in implementing a
ValidateSyncExecution
routine that runs before the sync evaluation call and checks for any states in the graph associated with reentrancy to skip sync execution in that case.This would permit the case as described in #38 since it is dealing with disjoint graphs. It is only when the unexecuted parts of the graph overlaps with an in-progress execution that execution would be skipped.
An alternative to skipping execution could still be to throw a reference error.