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

Issue 2459283004: [promises] Move CreateResolvingFunctions to c++ (Closed)

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

Description

[promises] Move CreateResolvingFunctions to c++ - A new runtime function (%create_resolving_functions) is installed to call the CreateResolvingFunctions builtin from JS. - Three new builtins are created - resolve and reject functions and a third function that creates a new JSFunctions from these resolve/reject builtins. - The promise reject function is installed on the context temporarily as internal_promise_reject. This should go away once we remove PromiseSet. BUG=v8:5343 Committed: https://crrev.com/cb6c8e48cc8bd31d44d08592cb6c8a6beee3777a Cr-Commit-Position: refs/heads/master@{#40903}

Patch Set 1 #

Patch Set 2 : use promise specific context #

Patch Set 3 : refactor #

Patch Set 4 : fix test #

Total comments: 19

Patch Set 5 : address comments #

Patch Set 6 : rebase #

Patch Set 7 : Remove header #

Total comments: 20

Patch Set 8 : review comments #

Patch Set 9 : fix enum #

Total comments: 12

Patch Set 10 : Address comments #

Total comments: 6

Patch Set 11 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -42 lines) Patch
M BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -0 lines 0 comments Download
M src/builtins/builtins.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A src/builtins/builtins-promise.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +113 lines, -0 lines 0 comments Download
M src/contexts.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -1 line 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M src/js/async-await.js View 1 1 chunk +1 line, -1 line 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 7 8 9 6 chunks +21 lines, -39 lines 0 comments Download
M src/v8.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 51 (32 generated)
gsathya
4 years, 1 month ago (2016-11-08 15:39:11 UTC) #10
adamk
Looking good, adding bmeurer to CC since he suggested this approach. https://codereview.chromium.org/2459283004/diff/60001/src/bootstrapper.cc File src/bootstrapper.cc (right): ...
4 years, 1 month ago (2016-11-08 18:09:55 UTC) #13
caitp
this looks pretty nice --- in my version of this, I opted to implement CreateResolvingFunctions ...
4 years, 1 month ago (2016-11-08 18:30:04 UTC) #15
gsathya
https://codereview.chromium.org/2459283004/diff/60001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2459283004/diff/60001/src/bootstrapper.cc#newcode3602 src/bootstrapper.cc:3602: Handle<String> name = isolate()->factory()->InternalizeUtf8String(""); On 2016/11/08 18:09:54, adamk wrote: ...
4 years, 1 month ago (2016-11-08 20:03:19 UTC) #20
gsathya
On 2016/11/08 18:30:04, caitp wrote: > this looks pretty nice --- in my version of ...
4 years, 1 month ago (2016-11-08 20:09:16 UTC) #21
caitp
On 2016/11/08 20:09:16, gsathya wrote: > On 2016/11/08 18:30:04, caitp wrote: > > this looks ...
4 years, 1 month ago (2016-11-08 20:13:27 UTC) #23
gsathya
On 2016/11/08 20:13:27, caitp wrote: > On 2016/11/08 20:09:16, gsathya wrote: > > On 2016/11/08 ...
4 years, 1 month ago (2016-11-08 20:15:47 UTC) #25
caitp
On 2016/11/08 20:15:47, gsathya wrote: > On 2016/11/08 20:13:27, caitp wrote: > > On 2016/11/08 ...
4 years, 1 month ago (2016-11-08 20:17:12 UTC) #26
adamk
https://codereview.chromium.org/2459283004/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2459283004/diff/120001/src/builtins/builtins-promise.cc#newcode11 src/builtins/builtins-promise.cc:11: kAlreadyVisitedSlot = 4, Should this 4 be Context::MIN_CONTEXT_SLOTS or ...
4 years, 1 month ago (2016-11-09 00:06:23 UTC) #27
gsathya
https://codereview.chromium.org/2459283004/diff/120001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2459283004/diff/120001/src/builtins/builtins-promise.cc#newcode11 src/builtins/builtins-promise.cc:11: kAlreadyVisitedSlot = 4, On 2016/11/09 00:06:23, adamk wrote: > ...
4 years, 1 month ago (2016-11-09 00:57:33 UTC) #32
Benedikt Meurer
https://codereview.chromium.org/2459283004/diff/160001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2459283004/diff/160001/src/bootstrapper.cc#newcode3624 src/bootstrapper.cc:3624: factory()->InternalizeUtf8String("create_resolving_functions"), Nit: this guy doesn't need a name IMHO. ...
4 years, 1 month ago (2016-11-09 05:14:30 UTC) #35
gsathya
https://codereview.chromium.org/2459283004/diff/160001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2459283004/diff/160001/src/bootstrapper.cc#newcode3624 src/bootstrapper.cc:3624: factory()->InternalizeUtf8String("create_resolving_functions"), On 2016/11/09 05:14:30, Benedikt Meurer wrote: > Nit: ...
4 years, 1 month ago (2016-11-09 15:57:45 UTC) #36
Benedikt Meurer
Thanks for the explanations. LGTM from my side then.
4 years, 1 month ago (2016-11-09 20:01:36 UTC) #41
Benedikt Meurer
And nice work!
4 years, 1 month ago (2016-11-09 20:01:48 UTC) #42
adamk
lgtm % nits https://codereview.chromium.org/2459283004/diff/180001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2459283004/diff/180001/src/builtins/builtins-promise.cc#newcode14 src/builtins/builtins-promise.cc:14: kLength, s/kLength/kPromiseContextLength/ ("kLength" is going to ...
4 years, 1 month ago (2016-11-09 21:36:21 UTC) #43
gsathya
https://codereview.chromium.org/2459283004/diff/180001/src/builtins/builtins-promise.cc File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2459283004/diff/180001/src/builtins/builtins-promise.cc#newcode14 src/builtins/builtins-promise.cc:14: kLength, On 2016/11/09 21:36:20, adamk wrote: > s/kLength/kPromiseContextLength/ ("kLength" ...
4 years, 1 month ago (2016-11-10 15:26:21 UTC) #44
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/2459283004/200001
4 years, 1 month ago (2016-11-10 15:27:54 UTC) #47
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 1 month ago (2016-11-10 16:04:22 UTC) #49
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:29:40 UTC) #51
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/cb6c8e48cc8bd31d44d08592cb6c8a6beee3777a
Cr-Commit-Position: refs/heads/master@{#40903}

Powered by Google App Engine
This is Rietveld 408576698