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

Issue 515012: Use a loop in generated code to allocate stack slots for function with many l... (Closed)

Created:
11 years ago by fschneider
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Use a loop in generated code to allocate stack slots for function with many local variables. If a function contains more than a certain number of locals (IA32: 9, X64: 6, ARM: 4) a loop for initializing the locals with 'undefined' is more compact. For less locals we unroll that loop by emitting a sequence of push instructions. Committed: http://code.google.com/p/v8/source/detail?r=3521

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -11 lines) Patch
M src/arm/virtual-frame-arm.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/arm/virtual-frame-arm.cc View 1 1 chunk +18 lines, -5 lines 0 comments Download
M src/ia32/virtual-frame-ia32.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/virtual-frame-ia32.cc View 1 1 chunk +24 lines, -4 lines 0 comments Download
M src/x64/virtual-frame-x64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/virtual-frame-x64.cc View 1 1 chunk +20 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
fschneider
11 years ago (2009-12-23 14:24:19 UTC) #1
Mads Ager (chromium)
LGTM with a couple of nits. http://codereview.chromium.org/515012/diff/1/4 File src/arm/virtual-frame-arm.cc (right): http://codereview.chromium.org/515012/diff/1/4#newcode149 src/arm/virtual-frame-arm.cc:149: if (count < ...
11 years ago (2009-12-23 14:30:52 UTC) #2
fschneider
11 years ago (2009-12-23 15:16:38 UTC) #3
http://codereview.chromium.org/515012/diff/1/4
File src/arm/virtual-frame-arm.cc (right):

http://codereview.chromium.org/515012/diff/1/4#newcode149
src/arm/virtual-frame-arm.cc:149: if (count < 5) {
On 2009/12/23 14:30:52, Mads Ager wrote:
> Please introduce a platform-dependent named constant for this value.

Done.

http://codereview.chromium.org/515012/diff/1/4#newcode155
src/arm/virtual-frame-arm.cc:155: // For more kocals a loop in generated code is
more compact.
On 2009/12/23 14:30:52, Mads Ager wrote:
> kocals -> locals

Done.

http://codereview.chromium.org/515012/diff/1/2
File src/ia32/virtual-frame-ia32.cc (right):

http://codereview.chromium.org/515012/diff/1/2#newcode543
src/ia32/virtual-frame-ia32.cc:543: for (int i = 0; i < count; i++) {
On 2009/12/23 14:30:52, Mads Ager wrote:
> This loop should be extracted.  It happens in all branches, so you can just
> always do it at the end.

Done.

http://codereview.chromium.org/515012/diff/1/3
File src/x64/virtual-frame-x64.cc (right):

http://codereview.chromium.org/515012/diff/1/3#newcode155
src/x64/virtual-frame-x64.cc:155: for (int i = 0; i < count; i++) {
On 2009/12/23 14:30:52, Mads Ager wrote:
> Ditto.

Done.

Powered by Google App Engine
This is Rietveld 408576698