Implement the Top-level await proposal
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: alex.fdm, Assigned: yulia)
References
(Blocks 2 open bugs, )
Details
(Keywords: dev-doc-complete)
Attachments
(15 files, 6 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
The proposal is currently in Stage 2.
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
See also the integration in HTML (https://github.com/whatwg/html/pull/4352) and Service Workers (https://github.com/w3c/ServiceWorker/issues/1407).
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
•
|
||
This still needs to be cleaned up
Assignee | ||
Comment 4•3 years ago
•
|
||
This change introduces an async emitter that can be shared by FunctionEmitter and module code.
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D93487
Assignee | ||
Comment 6•3 years ago
•
|
||
Introduces modules that can be suspended.
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D93523
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D93524
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D83773
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 11•3 years ago
|
||
Depends on D93524
Assignee | ||
Comment 12•3 years ago
|
||
Depends on D95883
Assignee | ||
Comment 13•3 years ago
|
||
Depends on D95884
Assignee | ||
Comment 14•3 years ago
|
||
Depends on D93530
Updated•3 years ago
|
Assignee | ||
Comment 15•3 years ago
|
||
Depends on D93530
Assignee | ||
Comment 16•3 years ago
|
||
Depends on D96066
Assignee | ||
Comment 17•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 18•3 years ago
|
||
Depends on D95885
Assignee | ||
Comment 19•3 years ago
|
||
Add tests behind the TLA flag;
Depends on D97181
Updated•3 years ago
|
Assignee | ||
Comment 20•3 years ago
|
||
Depends on D95885
Assignee | ||
Comment 21•3 years ago
|
||
Add tests behind the TLA flag;
Depends on D97184
Assignee | ||
Comment 22•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 23•3 years ago
|
||
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da24af409d92 Add flag for experimental Top Level Await feature; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/c723f6b16b67 Move HandlerFunction from streams into the builtin dir; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/d99f0109da7a Introduce SuspendableContext for async/generators in functions and modules; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/880873b815a4 Create AsyncEmitter to handle shared async behavior between functions and modules; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/10194540aff0 Add capability in GeneratorObject for modules to be suspended; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/d7f3440addc7 Implement basic stencil changes for top-level await; r=arai https://hg.mozilla.org/integration/autoland/rev/5f90543431cb Mark modules as async if we find a top level await while parsing; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/e0250e4cba61 Implement Top-level async bytecode; r=arai https://hg.mozilla.org/integration/autoland/rev/90b61247d071 Implement Top-level await specification; r=jonco https://hg.mozilla.org/integration/autoland/rev/c9afefd66eb7 Update Dynamic Import to use module promises, and implement module changes in shell. r=jonco https://hg.mozilla.org/integration/autoland/rev/bfd96f55a3bd Update web-platform tests, add expected behavior tests; r=emilio https://hg.mozilla.org/integration/autoland/rev/47cf4bde107e Implement module promises in html r=emilio,jonco https://hg.mozilla.org/integration/autoland/rev/ee02050e3c97 Use pref to completely pref-off top-level await in the browser; r=emilio,jonco https://hg.mozilla.org/integration/autoland/rev/5b89081f0f08 Add tests for top level await; r=jonco https://hg.mozilla.org/integration/autoland/rev/7302ebdbaa35 Adjust jit tests to work with module promises; r=mgaudet
Comment 24•3 years ago
|
||
Backed out 15 changesets (bug 1519100) for wpt leaks.
Backout link: https://hg.mozilla.org/integration/autoland/rev/3c3198bf2d4a541679012a100af53228a9c608d7
Failure log: https://treeherder.mozilla.org/logviewer?job_id=323343568&repo=autoland&lineNumber=21759
Comment 25•3 years ago
|
||
Yulia: hooray for top-level await
! I'm curious: will xpcshell
have top-level await
? I've actually wanted that in the very recent past.
Assignee | ||
Comment 26•3 years ago
|
||
Hi Nick:
So.. from my understanding xpcshell currently only compiles to global scripts. Top-Level await is restricted to modules. These are two different parse goals, so for now Top-Level await won't work for xpcshell, at least to my knowledge.
It should be possible to enable it, but I would need to talk to someone who knows more about xpcshell. You can use it in the js-shell with the flag --enable-top-level-await
and -m
for a module goal.
Comment 27•3 years ago
|
||
(In reply to Yulia Startsev from comment #26)
Hi Nick:
So.. from my understanding xpcshell currently only compiles to global scripts. Top-Level await is restricted to modules. These are two different parse goals, so for now Top-Level await won't work for xpcshell, at least to my knowledge.
Fascinating, TIL. Thanks, Yulia!
Comment 28•3 years ago
|
||
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3ea6c49dbf7 Add flag for experimental Top Level Await feature; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/98146209da6f Move HandlerFunction from streams into the builtin dir; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/9f559a616909 Introduce SuspendableContext for async/generators in functions and modules; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/b521ccd694f8 Create AsyncEmitter to handle shared async behavior between functions and modules; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/bab7e81a6c2c Add capability in GeneratorObject for modules to be suspended; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/d5bff6c95feb Implement basic stencil changes for top-level await; r=arai https://hg.mozilla.org/integration/autoland/rev/3a0a021acc08 Mark modules as async if we find a top level await while parsing; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/8b5244786634 Implement Top-level async bytecode; r=arai https://hg.mozilla.org/integration/autoland/rev/63d506024693 Implement Top-level await specification; r=jonco https://hg.mozilla.org/integration/autoland/rev/683743bd0395 Update Dynamic Import to use module promises, and implement module changes in shell. r=jonco https://hg.mozilla.org/integration/autoland/rev/55918f941155 Update web-platform tests, add expected behavior tests; r=emilio https://hg.mozilla.org/integration/autoland/rev/53a792431e11 Implement module promises in html r=emilio,jonco https://hg.mozilla.org/integration/autoland/rev/1155eecec034 Use pref to completely pref-off top-level await in the browser; r=emilio,jonco https://hg.mozilla.org/integration/autoland/rev/019b00c63941 Add tests for top level await; r=jonco https://hg.mozilla.org/integration/autoland/rev/16dc37dadf05 Adjust jit tests to work with module promises; r=mgaudet
Assignee | ||
Comment 29•3 years ago
|
||
eh, nuts that wasn't what I wanted to do... revert incoming..
Comment 30•3 years ago
|
||
Backed out as requested: https://hg.mozilla.org/integration/autoland/rev/ca855dab98dbe9dec01e236125b6ed557fd9637d
Comment 31•3 years ago
|
||
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6bdc2b79fa26 Add flag for experimental Top Level Await feature; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/ff6fd518d035 Move HandlerFunction from streams into the builtin dir; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/c11b43616a2f Introduce SuspendableContext for async/generators in functions and modules; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/d7f3a9ac1933 Create AsyncEmitter to handle shared async behavior between functions and modules; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/96c7515c8a1b Add capability in GeneratorObject for modules to be suspended; r=arai,mgaudet https://hg.mozilla.org/integration/autoland/rev/aa28d891047e Implement basic stencil changes for top-level await; r=arai https://hg.mozilla.org/integration/autoland/rev/406c05b73d5b Mark modules as async if we find a top level await while parsing; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/18bbeedf4c2e Implement Top-level async bytecode; r=arai https://hg.mozilla.org/integration/autoland/rev/740f71543c0e Implement Top-level await specification; r=jonco https://hg.mozilla.org/integration/autoland/rev/f9bea80a5393 Update Dynamic Import to use module promises, and implement module changes in shell. r=jonco https://hg.mozilla.org/integration/autoland/rev/1ffd544310f6 Update web-platform tests, add expected behavior tests; r=emilio https://hg.mozilla.org/integration/autoland/rev/1f8c2419d053 Implement module promises in html r=emilio,jonco https://hg.mozilla.org/integration/autoland/rev/76a1c42b797e Use pref to completely pref-off top-level await in the browser; r=emilio,jonco https://hg.mozilla.org/integration/autoland/rev/f3a874302dba Add tests for top level await; r=jonco https://hg.mozilla.org/integration/autoland/rev/7d9c82add62d Adjust jit tests to work with module promises; r=mgaudet
Comment 32•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6bdc2b79fa26
https://hg.mozilla.org/mozilla-central/rev/ff6fd518d035
https://hg.mozilla.org/mozilla-central/rev/c11b43616a2f
https://hg.mozilla.org/mozilla-central/rev/d7f3a9ac1933
https://hg.mozilla.org/mozilla-central/rev/96c7515c8a1b
https://hg.mozilla.org/mozilla-central/rev/aa28d891047e
https://hg.mozilla.org/mozilla-central/rev/406c05b73d5b
https://hg.mozilla.org/mozilla-central/rev/18bbeedf4c2e
https://hg.mozilla.org/mozilla-central/rev/740f71543c0e
https://hg.mozilla.org/mozilla-central/rev/f9bea80a5393
https://hg.mozilla.org/mozilla-central/rev/1ffd544310f6
https://hg.mozilla.org/mozilla-central/rev/1f8c2419d053
https://hg.mozilla.org/mozilla-central/rev/76a1c42b797e
https://hg.mozilla.org/mozilla-central/rev/f3a874302dba
https://hg.mozilla.org/mozilla-central/rev/7d9c82add62d
Assignee | ||
Updated•3 years ago
|
Comment 33•3 years ago
|
||
Rumyra got this new functionality documented on MDN! See https://github.com/mdn/content/issues/297#issuecomment-762767516 for descriptions of what she did.
Please let us know if you notice anything that needs updating, or can think of anything else you'd like to see added.
Reporter | ||
Updated•2 years ago
|
Updated•1 year ago
|
Description
•