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

Issue 1738003: Port apply with arguments optimization to ARM. This avoid allocating... (Closed)

Created:
10 years, 8 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Port apply with arguments optimization to ARM. This avoid allocating the arguments object when not necessary. Committed: http://code.google.com/p/v8/source/detail?r=4473

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -40 lines) Patch
M src/arm/codegen-arm.h View 4 chunks +25 lines, -0 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 8 chunks +307 lines, -40 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
10 years, 8 months ago (2010-04-22 11:01:07 UTC) #1
Søren Thygesen Gjesse
LGTM I hope we have good test coverage of apply with arguments. http://codereview.chromium.org/1738003/diff/1/2 File src/arm/codegen-arm.cc ...
10 years, 8 months ago (2010-04-22 11:51:18 UTC) #2
Mads Ager (chromium)
10 years, 8 months ago (2010-04-22 12:20:16 UTC) #3
http://codereview.chromium.org/1738003/diff/1/2
File src/arm/codegen-arm.cc (right):

http://codereview.chromium.org/1738003/diff/1/2#newcode1630
src/arm/codegen-arm.cc:1630: __ bind(&loop);
On 2010/04/22 11:51:18, Søren Gjesse wrote:
> How copying the arguments by having one register pointing at the source and
> using post increment to avoid recalculating for each iteration?

Good point. Loop changed to:

  Label loop;
  // r3 is a small non-negative integer, due to the test above.
  __ cmp(r3, Operand(0));
  __ b(eq, &invoke);
  // Compute the address of the first argument.
  __ add(r2, r2, Operand(r3, LSL, kPointerSizeLog2));
  __ add(r2, r2, Operand(kPointerSize));
  __ bind(&loop);
  // Post-decrement argument address by kPointerSize on each iteration.
  __ ldr(r4, MemOperand(r2, kPointerSize, NegPostIndex));
  __ push(r4);
  __ sub(r3, r3, Operand(1), SetCC);
  __ b(gt, &loop);

http://codereview.chromium.org/1738003/diff/1/2#newcode1644
src/arm/codegen-arm.cc:1644: // unchanged, with 3 elements, so it is correct
when we compile the
On 2010/04/22 11:51:18, Søren Gjesse wrote:
> Scary stuff "cheating" the virtual frame...

It is.

Powered by Google App Engine
This is Rietveld 408576698