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

Issue 75035: Change the enumeration order for unsigned integer keys to always be... (Closed)

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

Description

Change the enumeration order for unsigned integer keys to always be numerical order independently of the representation of the object. Exchanged the order of enumeration of integer and string keys so integer keys are first instead of string keys to better match WebKit/JSC behavior. Added test cases that document our enumeration order choice. Committed: http://code.google.com/p/v8/source/detail?r=1722

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -75 lines) Patch
M src/handles.cc View 3 chunks +12 lines, -12 lines 0 comments Download
M src/objects.h View 1 1 chunk +7 lines, -4 lines 2 comments Download
M src/objects.cc View 7 chunks +44 lines, -45 lines 2 comments Download
M test/cctest/test-api.cc View 1 3 chunks +57 lines, -10 lines 0 comments Download
M test/mjsunit/enumeration-order.js View 2 chunks +53 lines, -4 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Mads Ager (chromium)
11 years, 8 months ago (2009-04-16 11:13:31 UTC) #1
Mads Ager (chromium)
http://codereview.chromium.org/75035/diff/1003/1007 File src/objects.cc (right): http://codereview.chromium.org/75035/diff/1003/1007#newcode5140 Line 5140: if (!result.IsEmpty()) return true; I have no idea ...
11 years, 8 months ago (2009-04-16 11:14:56 UTC) #2
Kasper Lund
LGTM. http://codereview.chromium.org/75035/diff/1003/1007 File src/objects.cc (right): http://codereview.chromium.org/75035/diff/1003/1007#newcode5885 Line 5885: (NumberToUint32(numbers->get(j-1)) > j-1 -> j - 1 ...
11 years, 8 months ago (2009-04-16 11:22:04 UTC) #3
Mads Ager (chromium)
11 years, 8 months ago (2009-04-16 11:29:04 UTC) #4
On 2009/04/16 11:22:04, Kasper Lund wrote:
> LGTM.
> 
> http://codereview.chromium.org/75035/diff/1003/1007
> File src/objects.cc (right):
> 
> http://codereview.chromium.org/75035/diff/1003/1007#newcode5885
> Line 5885: (NumberToUint32(numbers->get(j-1)) >
> j-1 -> j - 1

Done for all occurrences.

> http://codereview.chromium.org/75035/diff/1003/1008
> File src/objects.h (right):
> 
> http://codereview.chromium.org/75035/diff/1003/1008#newcode1589
> Line 1589: // numbers array are equal, the elements are only swapped once.
> equal -> identical (or the same object)
> 
> http://codereview.chromium.org/75035/diff/1003/1008#newcode1593
> Line 1593: // numbers.  If the numbers array and the this array are equal, the
> Again.

Yes, thanks.  I went for 'the same object'.

> http://codereview.chromium.org/75035/diff/1003/1005
> File test/mjsunit/enumeration-order.js (right):
> 
> http://codereview.chromium.org/75035/diff/1003/1005#newcode57
> Line 57: // Validate the enumeration order for object literals up to 100 named
> properties.
> Long line. Not your fault.

Fixed.

Powered by Google App Engine
This is Rietveld 408576698