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

Issue 2956233002: [turbofan] Further optimize spread/apply with arguments/rest parameters. (Closed)

Created:
3 years, 5 months ago by Benedikt Meurer
Modified:
3 years, 5 months ago
Reviewers:
petermarshall
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Further optimize spread/apply with arguments/rest parameters. Extend the use list check for the arguments object/rest parameters during apply/spread optimization to allow for more cases, such that even in code like function foo() { if (arguments.length === 1) return arguments[0]; return bar.apply(this, arguments); } we don't need to materialize the arguments object. This obviously comes with a phase ordering problem, which we resolve by introducing a waitlist in the JSCallReducer, which contains the nodes that we should check again after all the other reductions are done, and which might then be reducible. This is not 100% ideal, but get's us closer to where we want to be, and it's crucial to speed up Node core, especially the event emitter. BUG=v8:4551, v8:5511, v8:5726 R=petermarshall@chromium.org Review-Url: https://codereview.chromium.org/2956233002 Cr-Commit-Position: refs/heads/master@{#46337} Committed: https://chromium.googlesource.com/v8/v8/+/1c555714dbd96709376f99a8f4487e9c3abcfa74

Patch Set 1 #

Patch Set 2 : Small improvement. #

Patch Set 3 : Drop debug print. #

Total comments: 9

Patch Set 4 : Fix nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -9 lines) Patch
M src/compiler/js-call-reducer.h View 2 chunks +5 lines, -0 lines 0 comments Download
M src/compiler/js-call-reducer.cc View 1 2 3 3 chunks +87 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (17 generated)
Benedikt Meurer
3 years, 5 months ago (2017-06-28 06:32:39 UTC) #1
Benedikt Meurer
Hey Peter, Here's the fix we talked about during breakfast. Please take a look. Thanks, ...
3 years, 5 months ago (2017-06-28 06:33:19 UTC) #4
petermarshall
Looking good but let's discuss the waitlist invariants https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc File src/compiler/js-call-reducer.cc (right): https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc#newcode43 src/compiler/js-call-reducer.cc:43: void ...
3 years, 5 months ago (2017-06-29 13:25:24 UTC) #13
Benedikt Meurer
https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc File src/compiler/js-call-reducer.cc (right): https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc#newcode43 src/compiler/js-call-reducer.cc:43: void JSCallReducer::Finalize() { Finalize can be called multiple times, ...
3 years, 5 months ago (2017-06-30 04:38:09 UTC) #14
Benedikt Meurer
https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc File src/compiler/js-call-reducer.cc (right): https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc#newcode758 src/compiler/js-call-reducer.cc:758: if (access.offset == JSArray::kLengthOffset) { Rest parameters are JSArray ...
3 years, 5 months ago (2017-06-30 04:39:37 UTC) #15
petermarshall
LGTM with nit! thanks https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc File src/compiler/js-call-reducer.cc (right): https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc#newcode758 src/compiler/js-call-reducer.cc:758: if (access.offset == JSArray::kLengthOffset) { ...
3 years, 5 months ago (2017-06-30 07:14:11 UTC) #16
Benedikt Meurer
https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc File src/compiler/js-call-reducer.cc (right): https://codereview.chromium.org/2956233002/diff/40001/src/compiler/js-call-reducer.cc#newcode709 src/compiler/js-call-reducer.cc:709: // explicitly checking that {node} only used by {LoadField} ...
3 years, 5 months ago (2017-06-30 07:21:36 UTC) #19
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/2956233002/60001
3 years, 5 months ago (2017-06-30 07:21:48 UTC) #23
commit-bot: I haz the power
3 years, 5 months ago (2017-06-30 07:47:40 UTC) #26
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/v8/v8/+/1c555714dbd96709376f99a8f4487e9c3ab...

Powered by Google App Engine
This is Rietveld 408576698