Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly track async evaluation order of pending modules
The execution order of modules that were waiting on a given async module was based on the order in which their [[AsyncEvaluation]] field was set to *true*. This PR replaces the [[AsyncEvaluation]] boolean with an actual number that keeps track of ordering in each agent. It also adds a note on when it's safe to reset this order to 0, since: - implementations might want to prevent this number from overflowing, and V8 currently has a bug that resets the number to 0 too early - figuring out when it's safe to reset the number might not be trivial, given the complexity of the module algorithms. I currently updated the example tables to just say that [[AsyncEvaluationOrder]] is set to "an integer" rather than *true*. In the next few days I'll update them to show the actual integer, but I first need to update https://nicolo-ribaudo.github.io/es-module-evaluation/ to verify that I'm not getting it wrong.
- Loading branch information