Skip to content

Editorial: allow [[AsyncEvaluationOrder]] to have any value when errored#3787

Open
nicolo-ribaudo wants to merge 3 commits intotc39:mainfrom
nicolo-ribaudo:remove-assertion
Open

Editorial: allow [[AsyncEvaluationOrder]] to have any value when errored#3787
nicolo-ribaudo wants to merge 3 commits intotc39:mainfrom
nicolo-ribaudo:remove-assertion

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

Fixes #3613 (comment).

[[AsyncEvaluationOrder]] is only use/used for non-yet evaluated modules.

  • ~DONE~ was added to distinguish the "not an integer and never was" case an assertion (Editorial: Adjust invalid assertion about [[AsyncEvaluationOrder]] #3613 (comment)) from "not an integer anymore" case (before we would just transition back from an integer to UNSET, or from true to false when using booleans). The goal of that assertion was to assert that "when we start executing an async module, we never tried to execute it before": leaving [[AsyncEvaluationOrder]] as an integer still fulfills that goal.
  • it is possible we can now leave [[AsyncEvaluationOrder]] as an integer forever also for non-error cases. Historically that was not possible because Evaluate() checked if the root module was still pending by checking that [[AsyncEvaluation]] was false (which, after the rewrite to [[AsyncEvaluationOrder]], would be equivalent to "[[AsyncEvaluationOrder]] is not an integer"), but now it's just checking that [[Status]] is EVALUATED.
    • This would be a follow up if we want to do it.

@github-actions
Copy link
Copy Markdown

The rendered spec for this PR is available as a single page at https://tc39.es/ecma262/pr/3787 and as multiple pages at https://tc39.es/ecma262/pr/3787/multipage .

@michaelficarra michaelficarra requested a review from syg March 30, 2026 22:45
@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land. spec bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants