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

Issue 1677223002: PPC: [runtime] Optimize and unify rest parameters. (Closed)

Created:
4 years, 10 months ago by MTBrandyberry
Modified:
4 years, 10 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

PPC: [runtime] Optimize and unify rest parameters. Port 3ef573e9f127345cd9d04d7f9f5e51bf169ae103 Original commit message: Replace the somewhat awkward RestParamAccessStub, which would always call into the runtime anyway with a proper FastNewRestParameterStub, which is basically based on the code that was already there for strict arguments object materialization. But for rest parameters we could optimize even further (leading to 8-10x improvements for functions with rest parameters), by fixing the internal formal parameter count: Every SharedFunctionInfo has a formal_parameter_count field, which specifies the number of formal parameters, and is used to decide whether we need to create an arguments adaptor frame when calling a function (i.e. if there's a mismatch between the actual and expected parameters). Previously the formal_parameter_count included the rest parameter, which was sort of unfortunate, as that meant that calling a function with only the non-rest parameters still required an arguments adaptor (plus some other oddities). Now with this CL we fix, so that we do no longer include the rest parameter in that count. Thereby checking for rest parameters is very efficient, as we only need to check whether there is an arguments adaptor frame, and if not create an empty array, otherwise check whether the arguments adaptor frame has more parameters than specified by the formal_parameter_count. The FastNewRestParameterStub is written in a way that it can be directly used by Ignition as well, and with some tweaks to the TurboFan backends and the CodeStubAssembler, we should be able to rewrite it as TurboFanCodeStub in the near future. Drive-by-fix: Refactor and unify the CreateArgumentsType which was different in TurboFan and Ignition; now we have a single enum class xwhich is used in both TurboFan and Ignition. R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com BUG=v8:2159 LOG=n Committed: https://crrev.com/605aced062f0a682a877061ce74e6932ecc65fea Cr-Commit-Position: refs/heads/master@{#33829}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -42 lines) Patch
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 chunk +5 lines, -14 lines 0 comments Download
M src/ppc/code-stubs-ppc.cc View 2 chunks +143 lines, -23 lines 0 comments Download
M src/ppc/interface-descriptors-ppc.cc View 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
MTBrandyberry
4 years, 10 months ago (2016-02-08 19:37:24 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677223002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677223002/1
4 years, 10 months ago (2016-02-08 19:38:53 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-08 20:11:54 UTC) #5
michael_dawson
On 2016/02/08 20:11:54, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 10 months ago (2016-02-08 22:08:08 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677223002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677223002/1
4 years, 10 months ago (2016-02-08 22:09:00 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-02-08 22:10:52 UTC) #9
commit-bot: I haz the power
4 years, 10 months ago (2016-02-08 22:11:41 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/605aced062f0a682a877061ce74e6932ecc65fea
Cr-Commit-Position: refs/heads/master@{#33829}

Powered by Google App Engine
This is Rietveld 408576698