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

Issue 605024: Port arguments object allocation in generated code to ARM and x64.... (Closed)

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

Description

Port arguments object allocation in generated code to ARM and x64. BUG=v8:611 Committed: http://code.google.com/p/v8/source/detail?r=3867

Patch Set 1 #

Total comments: 19

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -16 lines) Patch
M src/arm/codegen-arm.cc View 1 3 chunks +89 lines, -7 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 2 chunks +5 lines, -1 line 0 comments Download
M src/x64/assembler-x64.cc View 1 3 chunks +13 lines, -2 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 1 chunk +83 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
10 years, 10 months ago (2010-02-15 15:50:55 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/605024/diff/1/4 File src/arm/codegen-arm.cc (right): http://codereview.chromium.org/605024/diff/1/4#newcode6768 src/arm/codegen-arm.cc:6768: __ ldr(r1, MemOperand(sp, 0 * kPointerSize)); Just 0? ...
10 years, 10 months ago (2010-02-16 08:53:08 UTC) #2
Mads Ager (chromium)
10 years, 10 months ago (2010-02-16 10:23:51 UTC) #3
http://codereview.chromium.org/605024/diff/1/4
File src/arm/codegen-arm.cc (right):

http://codereview.chromium.org/605024/diff/1/4#newcode6768
src/arm/codegen-arm.cc:6768: __ ldr(r1, MemOperand(sp, 0 * kPointerSize));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> Just 0?

Done.

http://codereview.chromium.org/605024/diff/1/4#newcode6774
src/arm/codegen-arm.cc:6774: __ str(r1, MemOperand(sp, 0 * kPointerSize));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> Just 0?

Done.

http://codereview.chromium.org/605024/diff/1/4#newcode6809
src/arm/codegen-arm.cc:6809: __ str(r3, FieldMemOperand(r0,
JSObject::kHeaderSize));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> Maybe some constants on the object layout would be helpful. That goes for all
> platforms.

Added a frame-layout comment at the start of the function on all platforms.

http://codereview.chromium.org/605024/diff/1/4#newcode6813
src/arm/codegen-arm.cc:6813: __ ldr(r1, MemOperand(sp, 0 * kPointerSize));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> Just 0?

Done.

http://codereview.chromium.org/605024/diff/1/4#newcode6814
src/arm/codegen-arm.cc:6814: __ str(r1, FieldMemOperand(r0,
JSObject::kHeaderSize + kPointerSize));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> Ditto.

Done.

http://codereview.chromium.org/605024/diff/1/4#newcode6830
src/arm/codegen-arm.cc:6830: __ str(r3, FieldMemOperand(r4,
FixedArray::kMapOffset));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> As FixedArray::kLengthOffset is FixedArray::kMapOffset + kPointerSize you
could
> use post increment - and have an assert. This could prepare r3 for the loop
> below.

I don't understand this comment.  r3 contains the fixed array map which we store
in the newly allocated memory to initialize the elements fixed array.

http://codereview.chromium.org/605024/diff/1/4#newcode6837
src/arm/codegen-arm.cc:6837: __ str(r3, FieldMemOperand(r4,
FixedArray::kHeaderSize));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> I think the add/sub can be replaced by post increment in the ldr/str above, as
> r2 and r4 is not used afterwards.

Uh, nice.  Done.

http://codereview.chromium.org/605024/diff/1/3
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/605024/diff/1/3#newcode7383
src/x64/codegen-x64.cc:7383: __ movq(rbx, FieldOperand(rdi, i));
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> rbx -> kScratchRegister?

Done.

Also for similar occurrences below.

http://codereview.chromium.org/605024/diff/1/3#newcode7422
src/x64/codegen-x64.cc:7422: __ testq(rcx, rcx);
On 2010/02/16 08:53:08, Søren Gjesse wrote:
> Is this testq needed?

Good catch, no it is not needed as dec sets the zero flag.  Fixed in the ia32
version as well.

Powered by Google App Engine
This is Rietveld 408576698