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

Issue 1858002: Port inlined version of swap primitive for sorting from ia32 to x64.... (Closed)

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

Description

Port inlined version of swap primitive for sorting from ia32 to x64. Original code review for ia32 version: http://codereview.chromium.org/1709008 Committed: http://code.google.com/p/v8/source/detail?r=4569

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -61 lines) Patch
M src/ia32/codegen-ia32.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/x64/codegen-x64.h View 1 2 chunks +39 lines, -1 line 0 comments Download
M src/x64/codegen-x64.cc View 1 3 chunks +103 lines, -2 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 4 chunks +14 lines, -57 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
10 years, 7 months ago (2010-05-03 13:34:51 UTC) #1
William Hesse
LGTM with comments. http://codereview.chromium.org/1858002/diff/1/4 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/1858002/diff/1/4#newcode4544 src/x64/codegen-x64.cc:4544: deferred->Branch(less); Should be below, not less, ...
10 years, 7 months ago (2010-05-03 14:59:52 UTC) #2
Mads Ager (chromium)
10 years, 7 months ago (2010-05-03 17:43:36 UTC) #3
http://codereview.chromium.org/1858002/diff/1/4
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/1858002/diff/1/4#newcode4544
src/x64/codegen-x64.cc:4544: deferred->Branch(less);
On 2010/05/03 14:59:52, William Hesse wrote:
> Should be below, not less, I think, since we do cmpb.

Yes, good catch, thanks.

http://codereview.chromium.org/1858002/diff/1/4#newcode4556
src/x64/codegen-x64.cc:4556: Condition both_smi = __ CheckBothSmi(index1.reg(),
index2.reg());
On 2010/05/03 14:59:52, William Hesse wrote:
> Shouldn't you check that both are positive smis, and below the size of the
> array?  Or do you know that, because of the caller of this function?  If so,
it
> should be commented, I think.  I checked and this is not commented in
> codegen-x64.h.

I know because of the caller. This inlined code is only generated for the sort
routine in array.js.  I'll add a comment to both the ia32 and x64 versions.  The
indices are expected to be positive and within bounds - there are no bounds
checks in this code either.

Powered by Google App Engine
This is Rietveld 408576698