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

Issue 2930623002: [builtins] Start refactoring the Apply builtin. (Closed)

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

Description

[builtins] Start refactoring the Apply builtin. This splits the monolithic Apply builtin into several smaller builtins, namely CallVargargs and ConstructVarargs, which accept a length and a FixedArray of elements and deal with the actual stack manipulation, and CallWithArrayLike / ConstructWithArrayLike that deal with getting the elements from the receiver (for Function.prototype.apply, Reflect.apply and Reflect.construct), which can now be written using the CSA. The idea is that these builtins can be reused by TurboFan directly in the future when we optimize apply better, and that we can also reuse the core logic in the handling of spread calls/constructs. R=petermarshall@chromium.org BUG=v8:4587, v8:5269 Review-Url: https://codereview.chromium.org/2930623002 Cr-Commit-Position: refs/heads/master@{#45794} Committed: https://chromium.googlesource.com/v8/v8/+/af76779aa3064a8d5ce8f7b88836110f3de4cfa0

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+825 lines, -858 lines) Patch
M BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M src/arm/interface-descriptors-arm.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/arm64/interface-descriptors-arm64.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M src/arm64/macro-assembler-arm64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/arm64/macro-assembler-arm64.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/bailout-reason.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/builtins/arm/builtins-arm.cc View 1 9 chunks +45 lines, -144 lines 0 comments Download
M src/builtins/arm64/builtins-arm64.cc View 1 12 chunks +37 lines, -155 lines 0 comments Download
M src/builtins/builtins.h View 1 1 chunk +4 lines, -1 line 0 comments Download
A src/builtins/builtins-call-gen.h View 1 chunk +25 lines, -0 lines 0 comments Download
M src/builtins/builtins-call-gen.cc View 1 2 chunks +125 lines, -2 lines 0 comments Download
M src/builtins/builtins-constructor-gen.cc View 1 2 chunks +19 lines, -3 lines 0 comments Download
M src/builtins/builtins-definitions.h View 3 chunks +4 lines, -1 line 0 comments Download
M src/builtins/ia32/builtins-ia32.cc View 1 11 chunks +50 lines, -139 lines 0 comments Download
M src/builtins/mips/builtins-mips.cc View 1 7 chunks +36 lines, -128 lines 0 comments Download
M src/builtins/mips64/builtins-mips64.cc View 1 11 chunks +38 lines, -147 lines 0 comments Download
M src/builtins/x64/builtins-x64.cc View 1 11 chunks +44 lines, -138 lines 0 comments Download
M src/code-factory.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/code-factory.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M src/ia32/interface-descriptors-ia32.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/interface-descriptors.h View 4 chunks +34 lines, -0 lines 0 comments Download
M src/interface-descriptors.cc View 3 chunks +40 lines, -0 lines 0 comments Download
M src/mips/interface-descriptors-mips.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M src/mips64/interface-descriptors-mips64.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M src/mips64/macro-assembler-mips64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/mips64/macro-assembler-mips64.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M src/x64/interface-descriptors-x64.cc View 3 chunks +38 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (11 generated)
Benedikt Meurer
3 years, 6 months ago (2017-06-07 12:02:33 UTC) #1
petermarshall
LGTM with nits, thanks! https://codereview.chromium.org/2930623002/diff/1/src/builtins/builtins-call-gen.cc File src/builtins/builtins-call-gen.cc (right): https://codereview.chromium.org/2930623002/diff/1/src/builtins/builtins-call-gen.cc#newcode128 src/builtins/builtins-call-gen.cc:128: var_length.Bind(LoadAndUntagToWord32ObjectField(arguments_list, You can use LoadJSArrayLength ...
3 years, 6 months ago (2017-06-08 08:49:05 UTC) #6
Benedikt Meurer
Thanks, feedback addressed. https://codereview.chromium.org/2930623002/diff/1/src/builtins/builtins-call-gen.cc File src/builtins/builtins-call-gen.cc (right): https://codereview.chromium.org/2930623002/diff/1/src/builtins/builtins-call-gen.cc#newcode128 src/builtins/builtins-call-gen.cc:128: var_length.Bind(LoadAndUntagToWord32ObjectField(arguments_list, That doesn't untag. https://codereview.chromium.org/2930623002/diff/1/src/builtins/builtins-call-gen.cc#newcode149 src/builtins/builtins-call-gen.cc:149: ...
3 years, 6 months ago (2017-06-08 18:02:58 UTC) #9
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/2930623002/20001
3 years, 6 months ago (2017-06-08 18:03:21 UTC) #13
commit-bot: I haz the power
3 years, 6 months ago (2017-06-08 18:32:09 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/af76779aa3064a8d5ce8f7b88836110f3de...

Powered by Google App Engine
This is Rietveld 408576698