Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Issue 2047553002: Revert of Promises: Make PromiseSet operation monomorphic (Closed)

Created:
4 years, 6 months ago by gsathya
Modified:
4 years, 6 months ago
Reviewers:
Dan Ehrenberg, adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Revert of Promises: Make PromiseSet operation monomorphic (patchset #1 id:1 of https://codereview.chromium.org/2025073002/ ) Reason for revert: As a side effect of calling PromiseSet from FulfillPromise, clears the deferred symbol and the resolve/reject callback symbols. Although this isn't strictly necessary, not doing this seems to result in a leak as seen in -- https://bugs.chromium.org/p/chromium/issues/detail?id=617137#c10 Original issue's description: > Promises: Make PromiseSet operation monomorphic > > The PromiseSet operation is called with two types of promises > 1) A newly created promise object with no properties > 2) Promise object with callbacks and other properties > > PromiseSet is called with the first type of promise (with no > properties) from multiple call sites. PromiseSet is called with the > second type of promise object only from FulfillPromise. Furthermore, > this call only sets the value and status of the promise, the rest of > the values are reset to UNDEFINED (which isn't necessary). > > This patch inlines the calls to set the value and status of the > promise in FulfillPromise, instead of calling out to PromiseSet. > > This patch also reduces the number of symbol lookups, as we only set > the value and status of the promise, and don't change the callback or > deferred symbols. > > This patch results in a performance improvement of 2.8% over 5 runs in > the bluebird benchmark. > > BUG=v8:5046 > > Committed: https://crrev.com/df4f8a2b9ee9e474e674301718d19b63650a0ba5 > Cr-Commit-Position: refs/heads/master@{#36688} TBR=littledan@chromium.org,adamk@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=v8:5046 Committed: https://crrev.com/9b606523b5e210f60c4260ee5f50a54e8f07adbd Cr-Commit-Position: refs/heads/master@{#36766}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -2 lines) Patch
M src/js/promise.js View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
gsathya
Created Revert of Promises: Make PromiseSet operation monomorphic
4 years, 6 months ago (2016-06-06 21:18:04 UTC) #1
adamk
lgtm
4 years, 6 months ago (2016-06-06 21:39:00 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047553002/1
4 years, 6 months ago (2016-06-06 21:39:40 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-06 22:02:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047553002/1
4 years, 6 months ago (2016-06-06 22:04:14 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 6 months ago (2016-06-06 22:06:15 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-06-06 22:06:56 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9b606523b5e210f60c4260ee5f50a54e8f07adbd
Cr-Commit-Position: refs/heads/master@{#36766}

Powered by Google App Engine
This is Rietveld 408576698