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

Issue 12653010: Fix %GetArrayKeys to not skip non-enumerable indices (Closed)

Created:
7 years, 9 months ago by adamk
Modified:
7 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix %GetArrayKeys to not skip non-enumerable indices This is one step in the direction of fixing a range of small bugs in the array methods when dealing with non-standard element attributes. Added tests exercising this behavior for shift and unshift. For Proxies and Interceptors, the behavior of %GetArrayKeys is now to just return an interval, rather than trying to list all their indexed properties. In the Proxy case, this seems like the only way to avoid an observable difference between smart and non-smart array methods. For Interceptors, the usual case (in WebKit, anyway) is for them to have all indices in [0, length), so enumerating them won't be any better than simply iterating over that range. Committed: https://code.google.com/p/v8/source/detail?r=14057

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Handle review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -25 lines) Patch
M src/runtime.cc View 1 2 chunks +31 lines, -25 lines 0 comments Download
M test/mjsunit/array-shift.js View 1 chunk +14 lines, -0 lines 0 comments Download
M test/mjsunit/array-unshift.js View 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
adamk
Let me know if I should file a tracking bug for this work (I plan ...
7 years, 9 months ago (2013-03-21 21:58:20 UTC) #1
Michael Starzinger
Drive-by comment. I'll leave the rest of this CL to Andreas. :) https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc File src/runtime.cc ...
7 years, 9 months ago (2013-03-22 10:12:20 UTC) #2
rossberg
https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc#newcode9579 src/runtime.cc:9579: int keys_length = keys->length(); Isn't the filtering below redundant ...
7 years, 9 months ago (2013-03-22 14:22:34 UTC) #3
adamk
https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc#newcode9543 src/runtime.cc:9543: static Object* NewSingleInterval(Isolate* isolate, uint32_t length) { On 2013/03/22 ...
7 years, 9 months ago (2013-03-22 15:11:18 UTC) #4
rossberg
LGTM with comments https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc#newcode9579 src/runtime.cc:9579: int keys_length = keys->length(); On 2013/03/22 ...
7 years, 9 months ago (2013-03-22 17:27:22 UTC) #5
adamk
https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/12653010/diff/2001/src/runtime.cc#newcode9579 src/runtime.cc:9579: int keys_length = keys->length(); On 2013/03/22 17:27:22, rossberg wrote: ...
7 years, 9 months ago (2013-03-22 17:51:34 UTC) #6
adamk
7 years, 9 months ago (2013-03-22 18:04:36 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 manually as r14057 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698