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

Issue 2590563003: [promises] Remove deferred object (Closed)

Created:
4 years ago by gsathya
Modified:
3 years, 11 months ago
CC:
v8-reviews_googlegroups.com, adamk
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[promises] Remove deferred object This patch stores the promise, resolve, reject properties of the deferred object created by CreateInternalPromiseCapability and NewPromiseCapability directly on the promise (if the promise hasn't been fulfilled), otherwise they are stored on the PromiseReactionJobInfo. This patch removes the currently unused CreateInternalPromiseCapability and inlines the call to create the deferred promise object. NewPromiseCapability is the only function that works with a deferred. This patch results in a 8.5% improvement in benchmarks over 5 runs. BUG=v8:5343 Review-Url: https://codereview.chromium.org/2590563003 Cr-Commit-Position: refs/heads/master@{#41991} Committed: https://chromium.googlesource.com/v8/v8/+/5668ce39873f97f0bd8b25289f41c88cf91aa9bc

Patch Set 1 #

Patch Set 2 : work work work #

Patch Set 3 : Remove comment #

Total comments: 1

Patch Set 4 : fix tests #

Patch Set 5 : fix test #

Total comments: 11

Patch Set 6 : add comments #

Total comments: 2

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -195 lines) Patch
M src/bootstrapper.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins-promise.h View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M src/builtins/builtins-promise.cc View 1 2 3 4 5 6 18 chunks +115 lines, -82 lines 0 comments Download
M src/code-stub-assembler.h View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 5 6 1 chunk +11 lines, -4 lines 0 comments Download
M src/factory.h View 1 2 3 4 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 1 chunk +7 lines, -5 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 6 chunks +32 lines, -20 lines 0 comments Download
M src/js/async-await.js View 1 2 3 4 5 6 5 chunks +5 lines, -9 lines 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 6 chunks +7 lines, -20 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 4 chunks +29 lines, -10 lines 0 comments Download
M src/objects-debug.cc View 1 2 chunks +18 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 2 chunks +9 lines, -2 lines 0 comments Download
M src/objects-printer.cc View 6 2 chunks +6 lines, -2 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-promise.cc View 1 2 3 4 5 6 6 chunks +23 lines, -25 lines 0 comments Download
M test/cctest/test-code-stub-assembler.cc View 1 2 3 4 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 43 (31 generated)
gsathya
4 years ago (2016-12-20 01:36:01 UTC) #7
caitp
https://codereview.chromium.org/2590563003/diff/40001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2590563003/diff/40001/src/builtins/builtins-promise.cc#newcode316 src/builtins/builtins-promise.cc:316: StoreObjectField(promise, JSPromise::kDeferredPromiseOffset, The multiple chains case seems likely to ...
4 years ago (2016-12-20 02:53:01 UTC) #13
gsathya
PTAL, all tests pass. On 2016/12/20 02:53:01, caitp wrote: > https://codereview.chromium.org/2590563003/diff/40001/src/builtins/builtins-promise.cc > File src/builtins/builtins-promise.cc (right): ...
4 years ago (2016-12-20 18:38:31 UTC) #20
jgruber
Nice! lgtm with comments. https://codereview.chromium.org/2590563003/diff/80001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2590563003/diff/80001/src/builtins/builtins-promise.cc#newcode286 src/builtins/builtins-promise.cc:286: StoreFixedArrayElement(deferred_promise_arr, 1, deferred_promise); Maybe refactor ...
4 years ago (2016-12-21 08:08:29 UTC) #23
jgruber
https://codereview.chromium.org/2590563003/diff/80001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2590563003/diff/80001/src/builtins/builtins-promise.cc#newcode384 src/builtins/builtins-promise.cc:384: PromiseSetHasHandler(promise); On 2016/12/21 08:08:28, jgruber wrote: > By the ...
4 years ago (2016-12-21 08:45:07 UTC) #24
gsathya
https://codereview.chromium.org/2590563003/diff/80001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2590563003/diff/80001/src/builtins/builtins-promise.cc#newcode286 src/builtins/builtins-promise.cc:286: StoreFixedArrayElement(deferred_promise_arr, 1, deferred_promise); On 2016/12/21 08:08:28, jgruber wrote: > ...
4 years ago (2016-12-21 19:26:29 UTC) #27
gsathya
Igor, PTAL, thanks!
4 years ago (2016-12-22 16:19:40 UTC) #30
Igor Sheludko
lgtm https://codereview.chromium.org/2590563003/diff/100001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2590563003/diff/100001/src/builtins/builtins-promise.cc#newcode362 src/builtins/builtins-promise.cc:362: AllocateFixedArray(FAST_ELEMENTS, IntPtrConstant(2)); BTW, we have Tuple2 and Tuple3 ...
3 years, 11 months ago (2016-12-28 06:56:45 UTC) #31
gsathya
https://codereview.chromium.org/2590563003/diff/100001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2590563003/diff/100001/src/builtins/builtins-promise.cc#newcode362 src/builtins/builtins-promise.cc:362: AllocateFixedArray(FAST_ELEMENTS, IntPtrConstant(2)); On 2016/12/28 06:56:45, Igor Sheludko wrote: > ...
3 years, 11 months ago (2016-12-29 19:48:17 UTC) #32
gsathya
3 years, 11 months ago (2016-12-29 19:48:19 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2590563003/120001
3 years, 11 months ago (2016-12-29 20:27:59 UTC) #40
commit-bot: I haz the power
3 years, 11 months ago (2016-12-29 20:30:35 UTC) #43
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/v8/v8/+/5668ce39873f97f0bd8b25289f41c88cf91...

Powered by Google App Engine
This is Rietveld 408576698