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

Issue 92123: Fix Issue 326. Handle sorting of non-array objects correctly. (Closed)

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

Description

Fix Issue 326. Handle sorting of non-array objects correctly. Change handling of sorting to be the same for all JS-arrays. Collect undefined values as well while removing holes.

Patch Set 1 #

Patch Set 2 : Fixed smallish bug #

Total comments: 2

Patch Set 3 : Simplified fixed-array collation loop. Added more tests for dictionary. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -104 lines) Patch
M src/array.js View 1 chunk +3 lines, -24 lines 0 comments Download
M src/objects.h View 3 chunks +8 lines, -4 lines 0 comments Download
M src/objects.cc View 1 2 5 chunks +188 lines, -70 lines 4 comments Download
M src/runtime.h View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 1 chunk +9 lines, -5 lines 0 comments Download
M test/mjsunit/array-sort.js View 1 chunk +21 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-326.js View 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Lasse Reichstein
Review please. Please be particularly careful about the memory behavior of Dictionary. I'm almost, but ...
11 years, 8 months ago (2009-04-24 12:45:43 UTC) #1
Erik Corry
11 years, 8 months ago (2009-04-27 09:42:12 UTC) #2
LGTM

http://codereview.chromium.org/92123/diff/9/1008
File src/array.js (right):

http://codereview.chromium.org/92123/diff/9/1008#newcode713
Line 713: if (!(length >= 2)) return this;
I find the introduction of a negation makes this harder to read.

http://codereview.chromium.org/92123/diff/9/1010
File src/objects.h (right):

http://codereview.chromium.org/92123/diff/9/1010#newcode1182
Line 1182: // Undefined values are placed after non-un defined values.
spurious space.

http://codereview.chromium.org/92123/diff/3001/3003
File src/objects.cc (right):

http://codereview.chromium.org/92123/diff/3001/3003#newcode6400
Line 6400: static const uint32_t kMaxUInt32 = 4294967295u;
This should probably go next to kMaxInt in globals.h.  And in hex!

http://codereview.chromium.org/92123/diff/3001/3003#newcode6406
Line 6406: HeapNumber* result_double;
Please initialize to NULL and ASSERT it is not null before using.

http://codereview.chromium.org/92123/diff/3001/3003#newcode6498
Line 6498: limit = elements_length ;
Do we have a test that excercises this?

http://codereview.chromium.org/92123/diff/3001/3003#newcode6504
Line 6504: HeapNumber* result_double;
And here.

Powered by Google App Engine
This is Rietveld 408576698