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

Issue 2536463002: Create JSPromise (Closed)

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

Description

Object -- New JSObject for promises: JSPromise Builtins -- PromiseThen TFJ -- PromiseCreateAndSet TFJ for internal use -- PerformPromiseThen TFJ for internal use -- PromiseInit for initial promise setup -- SpeciesConstructor for use in PromiseThen -- ThrowIfNotJSReceiver for use in SpeciesConstructor -- AppendPromiseCallback to update FixedArray with new callback -- InternalPerformPromiseThen Promises.js -- Cleanup unused symbols -- Remove PerformPromiseThen -- Remove PromiseThen -- Remove PromiseSet -- Remove PromiseAttachCallbacks Runtime -- PromiseSet to set promise inobject values -- Refactor functions to use FixedArrays for callbacks instead of JSArray -- Runtime_PromiseStatus to return promise status -- Runtime_PromiseResult to return promise result -- Runtime_PromiseDeferred to return deferred attached to promise -- Runtime_PromiseRejectReactions to return reject reactions attached to promise This CL results in a 13.07% improvement in the promises benchmark (over 5 runs). BUG=v8:5343 Committed: https://crrev.com/30b564c76f490f8f6b311a74b25b26cf0a96be2d Cr-Commit-Position: refs/heads/master@{#41503}

Patch Set 1 #

Patch Set 2 : work work work #

Patch Set 3 : set dependent patch #

Patch Set 4 : work work work #

Patch Set 5 : fix #

Patch Set 6 : Remove stuff #

Patch Set 7 : update PromiseFulfill arg count #

Total comments: 85

Patch Set 8 : fix review comments #

Patch Set 9 : work work work #

Patch Set 10 : rebase #

Patch Set 11 : rebase #

Patch Set 12 : rebase #

Patch Set 13 : use update write barrier #

Total comments: 1

Patch Set 14 : rebase #

Patch Set 15 : use mode #

Patch Set 16 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+742 lines, -307 lines) Patch
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +22 lines, -3 lines 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M src/builtins/builtins-promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +441 lines, -17 lines 0 comments Download
M src/contexts.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +61 lines, -54 lines 0 comments Download
M src/debug/mirrors.js View 1 2 3 4 5 6 7 3 chunks +2 lines, -4 lines 0 comments Download
M src/heap-symbols.h View 1 1 chunk +0 lines, -6 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 7 11 12 13 2 chunks +9 lines, -18 lines 0 comments Download
M src/js/async-await.js View 1 2 3 4 5 6 7 4 chunks +2 lines, -3 lines 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +23 lines, -146 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 1 chunk +35 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -2 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -1 line 0 comments Download
M src/runtime/runtime-debug.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -28 lines 0 comments Download
M src/runtime/runtime-promise.cc View 1 2 3 4 5 6 7 5 chunks +86 lines, -18 lines 0 comments Download
M test/cctest/test-inobject-slack-tracking.cc View 1 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 76 (58 generated)
gsathya
Have some inline questions about FixedArrays in builtins-promise.cc::AppendPromiseCallback
4 years ago (2016-12-01 00:52:51 UTC) #14
caitp
I haven't looked too closely yet, but I like this better than the approach I ...
4 years ago (2016-12-01 01:36:50 UTC) #19
caitp
these get all the failing tests passing for me locally, except for that failing inspector ...
4 years ago (2016-12-01 04:03:08 UTC) #20
caitp
https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#newcode397 src/builtins/builtins-promise.cc:397: a->CopyFixedArrayElements(kind, elements, new_elements, length, I think this can end ...
4 years ago (2016-12-01 15:31:44 UTC) #21
caitp
https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#newcode397 src/builtins/builtins-promise.cc:397: a->CopyFixedArrayElements(kind, elements, new_elements, length, On 2016/12/01 15:31:44, caitp wrote: ...
4 years ago (2016-12-01 15:55:19 UTC) #22
jgruber
Nice! First round of comments. https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#newcode86 src/builtins/builtins-promise.cc:86: a->StoreObjectField(promise, JSPromise::kStatusOffset, status); You ...
4 years ago (2016-12-01 16:30:28 UTC) #23
gsathya
https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (left): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#oldcode223 src/builtins/builtins-promise.cc:223: void Builtins::Generate_IsPromise(compiler::CodeAssemblerState* state) { On 2016/12/01 01:36:50, caitp wrote: ...
4 years ago (2016-12-04 17:36:18 UTC) #42
gsathya
Still looking into the test failures. Seems related to the append code, but not reproducible ...
4 years ago (2016-12-05 02:24:53 UTC) #49
jgruber
lgtm https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#newcode257 src/builtins/builtins-promise.cc:257: compiler::Node* ThrowIfNotJSReceiver(CodeStubAssembler* a, Isolate* isolate, On 2016/12/04 17:36:17, ...
4 years ago (2016-12-05 07:58:36 UTC) #50
jgruber
https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#newcode389 src/builtins/builtins-promise.cc:389: Node* new_elements = a->AllocateFixedArray(kind, new_capacity, mode); On 2016/12/05 07:58:35, ...
4 years ago (2016-12-05 10:54:08 UTC) #51
caitp
https://codereview.chromium.org/2536463002/diff/240001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/240001/src/builtins/builtins-promise.cc#newcode388 src/builtins/builtins-promise.cc:388: a->StoreFixedArrayElement(new_elements, length, value); This fails on 32bit because `length` ...
4 years ago (2016-12-05 18:02:15 UTC) #56
caitp
lgtm
4 years ago (2016-12-05 19:10:32 UTC) #63
Benedikt Meurer
LGTM (rubber-stamp)
4 years ago (2016-12-05 19:11:19 UTC) #64
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/2536463002/300001
4 years ago (2016-12-05 21:05:55 UTC) #69
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years ago (2016-12-05 21:08:26 UTC) #72
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/30b564c76f490f8f6b311a74b25b26cf0a96be2d Cr-Commit-Position: refs/heads/master@{#41503}
4 years ago (2016-12-05 21:08:41 UTC) #74
jgruber
https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2536463002/diff/120001/src/builtins/builtins-promise.cc#newcode624 src/builtins/builtins-promise.cc:624: a.Branch(a.WordEqual(promise_fun, constructor), &fast_promise_capability, On 2016/12/05 07:58:35, jgruber wrote: > ...
4 years ago (2016-12-06 09:55:29 UTC) #75
Michael Achenbach
4 years ago (2016-12-06 11:18:14 UTC) #76
Message was sent while issue was closed.
A revert of this CL (patchset #16 id:300001) has been created in
https://codereview.chromium.org/2554013002/ by machenbach@chromium.org.

The reason for reverting is: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/bui...

See:
https://github.com/v8/v8/wiki/Blink-layout-tests.

Powered by Google App Engine
This is Rietveld 408576698