Closed Bug 1495072 Opened 6 years ago Closed 5 years ago

Implement new, faster proposed await semantics

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

Attachments

(3 files)

To be clear, this is a proposal in need of implementation experience. To me, it looks easy to implement and unlikely to cause breakage--and it's a significant performance boost on async code.
Priority: -- → P2
Note that the Blink intent for this claims that Edge ships the new behavior already.  Chrome is working on implementing.
This proposal is small enough that it doesn't seem to be going through the normal TC39 process. Tests have already landed in test262:

test262/language/expressions/await/async-await-interleaved.js
test262/language/expressions/await/async-generator-interleaved.js
test262/language/expressions/await/await-monkey-patched-promise.js
test262/language/expressions/await/for-await-of-interleaved.js
Assignee: nobody → jorendorff
Depends on: 1522874
Depends on: 1524612
Depends on: 1524628
Depends on: 1524726
Depends on: 1525395
Depends on: 1530833
Depends on: 1531443

This also changes a few functions to follow the unwrapped convention.

This does not do the job thoroughly for our whole implementation of promises
and async generators; but the patch casts enough light that I can see what I'm
doing in part 2.

This patch implements the proposal in this pull request:
https://github.com/tc39/ecma262/pull/1250

Depends on D21815

Depends on: 1533574
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/43c98aac932a
Part 1: Add some comments in Promise.cpp detailing algorithm steps. r=arai
https://hg.mozilla.org/integration/autoland/rev/a14fcb229ddd
Part 2: Implement new, faster proposed await semantics. r=arai
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Depends on: 1534806

Backed out the main patch (part 2) for causing bug 1534806.
https://hg.mozilla.org/mozilla-central/rev/1994e1ce54af

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla67 → ---

(In reply to Jason Orendorff [:jorendorff] from comment #9)

This also changes a few functions to follow the unwrapped convention.

I don't understand why the asyncGenObj parameter in AsyncGeneratorResumeNext was renamed to unwrappedGenerator. This object is not a possibly unwrapped object from another compartment.

Depends on: 1535674
Attachment #9047902 - Attachment description: Bug 1495072 - Part 2: Implement new, faster proposed await semantics. r?arai → Bug 1495072 - Part 3: Implement new, faster proposed await semantics. r=arai
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ce13940a2a3
Part 2: Add pref for the await fix. r=arai
https://hg.mozilla.org/integration/autoland/rev/269654f1eeb2
Part 3: Implement new, faster proposed await semantics. r=arai
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
No longer depends on: 1535674
Blocks: 1546145
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: