Commit Graph

2 Commits

Author SHA1 Message Date
Shu-yu Guo
e1fd3f6916 [flags] Remove --harmony-promise-all-settled
It's shipped since M76.

Bug: v8:9060
Change-Id: Ifb107f3ef77ab803d5c0ce34f0a31ac33088c41a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2510610
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70956}
2020-11-03 19:34:42 +00:00
Sathya Gunasekaran
9c0c876129 [promise] Lookup the resolve property only once
In the PerformPromise{All, Race, AllSettled} operations, the resolve
property of the constructor is looked up only once.

In the implementation, for the fast path, where the constructor's
resolve property is untainted, the resolve function is set to undefined.
Since undefined can't be a valid value for the resolve function,
we can switch on it (in CallResolve) to directly call the  PromiseResolve
builtin. If the resolve property is tainted, we do an observable property
lookup, save this value, and call this property later (in CallResolve).

I ran this CL against the test262 tests locally and they all pass:
https://github.com/tc39/test262/pull/2131

Spec:
- https://github.com/tc39/ecma262/pull/1506
- https://github.com/tc39/proposal-promise-allSettled/pull/40

Bug: v8:9152
Change-Id: Icb36a90b5a244a67a729611c7b3315d2c29de6e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1574705
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60957}
2019-04-23 17:31:03 +00:00