Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Explicitly track async evaluation order of pending modules #3353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 14, 2024

  1. 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.
    nicolo-ribaudo committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    f96a304 View commit details
    Browse the repository at this point in the history