|
|
Description[promises] Refactor CreatePromise
BUG=v8:5343
Committed: https://crrev.com/2886e3917f8c6f06707ed130b041d6acf2e95782
Cr-Commit-Position: refs/heads/master@{#41660}
Patch Set 1 #
Total comments: 1
Patch Set 2 : add tests #Patch Set 3 : add tests #Patch Set 4 : add promiseset #
Total comments: 1
Patch Set 5 : rename to allocatejspromise #
Messages
Total messages: 31 (21 generated)
The CQ bit was checked by gsathya@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [promises] Refactor CreatePromise BUG=v8:5343 ========== to ========== [promises] Refactor CreatePromise BUG=v8:5343 ==========
gsathya@chromium.org changed reviewers: + caitp@igalia.com, littledan@chromium.org
https://codereview.chromium.org/2571663002/diff/1/src/builtins/builtins-promi... File src/builtins/builtins-promise.cc (right): https://codereview.chromium.org/2571663002/diff/1/src/builtins/builtins-promi... src/builtins/builtins-promise.cc:62: compiler::Node* CreatePromise(CodeStubAssembler* a, compiler::Node* context) { There are _a lot_ of builtins that need to be able to allocate and initialize JSPromises. Can we move these helpers to CodeStubAssembler please? For less-widely needed helpers, I suggest subclassing CodeStubAssembler with PromiseBuiltinAssembler or something, and installing the helpers directly on it. Then, you can use the TF_BUILTIN() thing to generate builtins with the subclassed assembler, and avoid passing a pointer to the assembler everywhere. IMO it's much easier to read. Other than those nits, refactoring looks fine to me
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by gsathya@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm No opinion on Caitlin's style advice, but correctness-wise, this looks good to me.
The CQ bit was checked by gsathya@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/12/12 23:41:58, caitp wrote: > https://codereview.chromium.org/2571663002/diff/1/src/builtins/builtins-promi... > File src/builtins/builtins-promise.cc (right): > > https://codereview.chromium.org/2571663002/diff/1/src/builtins/builtins-promi... > src/builtins/builtins-promise.cc:62: compiler::Node* > CreatePromise(CodeStubAssembler* a, compiler::Node* context) { > There are _a lot_ of builtins that need to be able to allocate and initialize > JSPromises. Can we move these helpers to CodeStubAssembler please? Agreed. I've moved them. > For less-widely needed helpers, I suggest subclassing CodeStubAssembler with > PromiseBuiltinAssembler or something, and installing the helpers directly on it. > Then, you can use the TF_BUILTIN() thing to generate builtins with the > subclassed assembler, and avoid passing a pointer to the assembler everywhere. > IMO it's much easier to read. > > Other than those nits, refactoring looks fine to me Yes, I do want to do this, but I want to finish the porting first.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Lgtm https://codereview.chromium.org/2571663002/diff/60001/src/code-stub-assembler.h File src/code-stub-assembler.h (right): https://codereview.chromium.org/2571663002/diff/60001/src/code-stub-assembler... src/code-stub-assembler.h:1056: Node* CreatePromise(Node* context); I would suggest using AllocateJSPromise rather than CreatePromise, for consistency
The CQ bit was checked by gsathya@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/12/13 01:04:58, caitp wrote: > Lgtm > > https://codereview.chromium.org/2571663002/diff/60001/src/code-stub-assembler.h > File src/code-stub-assembler.h (right): > > https://codereview.chromium.org/2571663002/diff/60001/src/code-stub-assembler... > src/code-stub-assembler.h:1056: Node* CreatePromise(Node* context); > I would suggest using AllocateJSPromise rather than CreatePromise, for > consistency I see other methods with Create*, but shrug. Changed
On 2016/12/13 01:47:17, gsathya wrote: > On 2016/12/13 01:04:58, caitp wrote: > > Lgtm > > > > > https://codereview.chromium.org/2571663002/diff/60001/src/code-stub-assembler.h > > File src/code-stub-assembler.h (right): > > > > > https://codereview.chromium.org/2571663002/diff/60001/src/code-stub-assembler... > > src/code-stub-assembler.h:1056: Node* CreatePromise(Node* context); > > I would suggest using AllocateJSPromise rather than CreatePromise, for > > consistency > > I see other methods with Create*, but shrug. Changed You're right, but other than the one named after the spec op, there are only 2 like that, vs ~20 of the other style (and there are some named New<thing>, too, heh).
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by gsathya@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from littledan@chromium.org, caitp@igalia.com Link to the patchset: https://codereview.chromium.org/2571663002/#ps80001 (title: "rename to allocatejspromise")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1481595124298060, "parent_rev": "4ee177ad5e8bdee303cf6494dfcf10831f296d82", "commit_rev": "947bf5645edfe3edbf12e937b19e1f65d765ed68"}
Message was sent while issue was closed.
Description was changed from ========== [promises] Refactor CreatePromise BUG=v8:5343 ========== to ========== [promises] Refactor CreatePromise BUG=v8:5343 Review-Url: https://codereview.chromium.org/2571663002 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== [promises] Refactor CreatePromise BUG=v8:5343 Review-Url: https://codereview.chromium.org/2571663002 ========== to ========== [promises] Refactor CreatePromise BUG=v8:5343 Committed: https://crrev.com/2886e3917f8c6f06707ed130b041d6acf2e95782 Cr-Commit-Position: refs/heads/master@{#41660} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/2886e3917f8c6f06707ed130b041d6acf2e95782 Cr-Commit-Position: refs/heads/master@{#41660} |