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

Issue 2541283002: [promises] Port ResolvePromise to TF (Closed)

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

Description

[promises] Port ResolvePromise to TF -- Moves promiseHasHandlerSymbol to inobject property -- Ports PromiseResolveClosure to TF -- Fix a non spec async-await test which fails now because we do a map check for native promise check (instead of IsPromise). Changing the constructor (in the test) invalidates the map check. This patch results in a 7.1% performance improvement in the bluebird benchmark (over 5 runs). BUG=v8:5343 Committed: https://crrev.com/11359e331ae98978fe91b6c6925a1569dbd61856 Cr-Commit-Position: refs/heads/master@{#41569}

Patch Set 1 #

Patch Set 2 : fix test #

Patch Set 3 : fix test #

Patch Set 4 : fix GetHeaderSize #

Patch Set 5 : work work work #

Patch Set 6 : rebase #

Patch Set 7 : revert test #

Patch Set 8 : add comments #

Total comments: 20

Patch Set 9 : stuff #

Patch Set 10 : rebase #

Patch Set 11 : move hasHandler to inobject #

Patch Set 12 : remove unused var #

Patch Set 13 : remove ResolvePromise #

Total comments: 17

Patch Set 14 : fix #

Patch Set 15 : Fix test #

Total comments: 10

Patch Set 16 : fix nits #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -141 lines) Patch
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +28 lines, -1 line 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M src/builtins/builtins-promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +262 lines, -37 lines 0 comments Download
M src/contexts.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +4 lines, -3 lines 0 comments Download
M src/heap-symbols.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -1 line 0 comments Download
M src/js/async-await.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +2 lines, -6 lines 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +4 lines, -67 lines 1 comment Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M src/promise-utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -0 lines 0 comments Download
M src/promise-utils.cc View 1 2 3 4 1 chunk +0 lines, -7 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +16 lines, -8 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -3 lines 0 comments Download
D test/mjsunit/harmony/async-await-no-constructor.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/harmony/async-await-species.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 68 (47 generated)
gsathya
4 years ago (2016-12-03 01:44:15 UTC) #15
caitp
Until we can enqueue microtasks from JS, doesn't it make more sense for these to ...
4 years ago (2016-12-03 02:44:16 UTC) #16
gsathya
On 2016/12/03 02:44:16, caitp wrote: > Until we can enqueue microtasks from JS, doesn't it ...
4 years ago (2016-12-03 03:04:40 UTC) #17
caitp
On 2016/12/03 03:04:40, gsathya wrote: > On 2016/12/03 02:44:16, caitp wrote: > > Until we ...
4 years ago (2016-12-03 03:43:02 UTC) #18
jgruber
lgtm lgtm with comments https://codereview.chromium.org/2541283002/diff/140001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2541283002/diff/140001/src/builtins/builtins-promise.cc#newcode645 src/builtins/builtins-promise.cc:645: // RegExp fast path implementations ...
4 years ago (2016-12-05 09:25:17 UTC) #19
gsathya
https://codereview.chromium.org/2541283002/diff/140001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2541283002/diff/140001/src/builtins/builtins-promise.cc#newcode645 src/builtins/builtins-promise.cc:645: // RegExp fast path implementations rely on unmodified JSPromise ...
4 years ago (2016-12-05 16:03:05 UTC) #20
caitp
https://codereview.chromium.org/2541283002/diff/140001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2541283002/diff/140001/src/js/promise.js#newcode121 src/js/promise.js:121: %resolve_promise(promise, resolution); On 2016/12/05 16:03:05, gsathya wrote: > On ...
4 years ago (2016-12-05 16:22:51 UTC) #21
gsathya
On 2016/12/05 16:22:51, caitp wrote: > https://codereview.chromium.org/2541283002/diff/140001/src/js/promise.js > File src/js/promise.js (right): > > https://codereview.chromium.org/2541283002/diff/140001/src/js/promise.js#newcode121 > ...
4 years ago (2016-12-06 19:10:48 UTC) #33
caitp
On 2016/12/06 19:10:48, gsathya wrote: > On 2016/12/05 16:22:51, caitp wrote: > > https://codereview.chromium.org/2541283002/diff/140001/src/js/promise.js > ...
4 years ago (2016-12-06 19:16:58 UTC) #34
gsathya
On 2016/12/06 19:16:58, caitp wrote: > On 2016/12/06 19:10:48, gsathya wrote: > > On 2016/12/05 ...
4 years ago (2016-12-06 19:28:16 UTC) #35
gsathya
+ishell
4 years ago (2016-12-06 21:30:06 UTC) #39
jgruber
Nit: s/spec/test/ in commit message. Nice! lgtm modulo comments. https://codereview.chromium.org/2541283002/diff/140001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2541283002/diff/140001/src/builtins/builtins-promise.cc#newcode681 src/builtins/builtins-promise.cc:681: ...
4 years ago (2016-12-07 12:59:39 UTC) #40
Igor Sheludko
lgtm with a nit: https://codereview.chromium.org/2541283002/diff/240001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2541283002/diff/240001/src/api.cc#newcode7243 src/api.cc:7243: return js_promise->has_handler() == 1; Suggestion: ...
4 years ago (2016-12-07 16:23:52 UTC) #41
Dan Ehrenberg
https://codereview.chromium.org/2541283002/diff/240001/test/mjsunit/harmony/async-await-no-constructor.js File test/mjsunit/harmony/async-await-no-constructor.js (left): https://codereview.chromium.org/2541283002/diff/240001/test/mjsunit/harmony/async-await-no-constructor.js#oldcode27 test/mjsunit/harmony/async-await-no-constructor.js:27: assertEquals(0, count); Rather than deleting this test, would it ...
4 years ago (2016-12-07 23:24:58 UTC) #43
gsathya
https://codereview.chromium.org/2541283002/diff/240001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2541283002/diff/240001/src/api.cc#newcode7243 src/api.cc:7243: return js_promise->has_handler() == 1; On 2016/12/07 16:23:52, Igor Sheludko ...
4 years ago (2016-12-08 05:18:15 UTC) #52
Benedikt Meurer
https://codereview.chromium.org/2541283002/diff/280001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2541283002/diff/280001/src/builtins/builtins-promise.cc#newcode286 src/builtins/builtins-promise.cc:286: namespace { Nit: empty line after namespace { https://codereview.chromium.org/2541283002/diff/280001/src/builtins/builtins-promise.cc#newcode295 ...
4 years ago (2016-12-08 05:22:30 UTC) #53
gsathya
Thanks for the reviews! https://codereview.chromium.org/2541283002/diff/280001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2541283002/diff/280001/src/builtins/builtins-promise.cc#newcode286 src/builtins/builtins-promise.cc:286: namespace { On 2016/12/08 05:22:30, ...
4 years ago (2016-12-08 05:28:40 UTC) #56
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/2541283002/300001
4 years ago (2016-12-08 06:10:38 UTC) #61
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years ago (2016-12-08 06:12:41 UTC) #64
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/11359e331ae98978fe91b6c6925a1569dbd61856 Cr-Commit-Position: refs/heads/master@{#41569}
4 years ago (2016-12-08 06:12:56 UTC) #66
jochen (gone - plz use gerrit)
4 years ago (2016-12-08 15:56:08 UTC) #68
Message was sent while issue was closed.
https://codereview.chromium.org/2541283002/diff/300001/src/js/promise.js
File src/js/promise.js (right):

https://codereview.chromium.org/2541283002/diff/300001/src/js/promise.js#newc...
src/js/promise.js:391: "promise_catch", PromiseCatch,
fyi, after the %SetCode above, we shouldn't use the original method anymore..
this will crash in the future

Powered by Google App Engine
This is Rietveld 408576698