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

Issue 553623004: ES6: Array.prototype.slice and friends should use ToLength instead of ToUint32

Created:
6 years, 3 months ago by Diego Pino
Modified:
5 years, 3 months ago
CC:
adamk, vjaquez, v8-dev
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

ES6: Array.prototype.slice and friends should use ToLength instead of ToUint32 - Use 'ToLength' instead of 'ToUint32' where necessary. BUG=v8:3087 LOG=

Patch Set 1 #

Total comments: 2

Patch Set 2 : Removed runtime.cc::ToLength(). Use runtime.js::ToLength(). Fixed test. #

Patch Set 3 : Added more tests. #

Total comments: 11

Patch Set 4 : Fixed last issues. #

Total comments: 4

Patch Set 5 : Remove tests that involve large numbers (MAX_VALUE or MAX_SAFE_INTEGER). #

Total comments: 6

Patch Set 6 : Reworked and added more tests #

Total comments: 4

Patch Set 7 : Fixed last issues. Added test for Array.prototype.fill. #

Total comments: 2

Patch Set 8 : Fixed nits #

Patch Set 9 : Use 'call' instead of 'apply'. #

Patch Set 10 : Fixed wrong parameter in TO_UINT32, /test/mjsunit/array-length.js was not passing. #

Patch Set 11 : Other harmony tests need to use harmony's ToLength version #

Patch Set 12 : SKIP several failing test262's tests in ES6 #

Patch Set 13 : Remove failing tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+371 lines, -24 lines) Patch
M src/array.js View 1 2 3 4 5 6 7 8 9 10 11 12 18 chunks +18 lines, -19 lines 0 comments Download
M src/harmony-array.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M src/harmony-array-includes.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M src/harmony-templates.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M test/mjsunit/array-indexing.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -2 lines 0 comments Download
M test/mjsunit/array-length.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -3 lines 0 comments Download
M test/mjsunit/harmony/array-fill.js View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/array-length.js View 1 2 3 4 5 6 7 8 1 chunk +225 lines, -0 lines 0 comments Download
M test/test262-es6/test262-es6.status View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +96 lines, -0 lines 0 comments Download

Messages

Total messages: 59 (18 generated)
aperez
https://codereview.chromium.org/553623004/diff/1/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/553623004/diff/1/src/runtime.cc#newcode6130 src/runtime.cc:6130: RUNTIME_FUNCTION(Runtime_ToLength) { Is there any particular reason not to ...
6 years, 3 months ago (2014-09-09 10:59:36 UTC) #2
Diego Pino
On 2014/09/09 10:59:36, aperez wrote: > https://codereview.chromium.org/553623004/diff/1/src/runtime.cc > File src/runtime.cc (right): > > https://codereview.chromium.org/553623004/diff/1/src/runtime.cc#newcode6130 > ...
6 years, 3 months ago (2014-09-09 12:14:18 UTC) #4
caitp (gmail)
On 2014/09/09 12:14:18, Diego Pino wrote: > On 2014/09/09 10:59:36, aperez wrote: > > https://codereview.chromium.org/553623004/diff/1/src/runtime.cc ...
6 years, 3 months ago (2014-09-09 12:33:32 UTC) #5
Diego Pino
On 2014/09/09 12:33:32, caitp wrote: > On 2014/09/09 12:14:18, Diego Pino wrote: > > On ...
6 years, 3 months ago (2014-09-09 16:02:58 UTC) #6
arv (Not doing code reviews)
FYI https://codereview.chromium.org/553623004/diff/1/src/array.js File src/array.js (right): https://codereview.chromium.org/553623004/diff/1/src/array.js#newcode360 src/array.js:360: var len = %ToLength(array.length); Remember that calling a ...
6 years, 3 months ago (2014-09-09 19:20:52 UTC) #8
rossberg
On 2014/09/09 19:20:52, arv wrote: > FYI > > https://codereview.chromium.org/553623004/diff/1/src/array.js > File src/array.js (right): > ...
6 years, 3 months ago (2014-09-10 07:26:24 UTC) #9
wingo
Looking good, needs more tests though for the new cases that the change exposes. (i.e. ...
6 years, 3 months ago (2014-09-19 10:28:57 UTC) #12
wingo
Some notes on the tests. https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js File test/mjsunit/array-length.js (right): https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode133 test/mjsunit/array-length.js:133: Array.prototype.toString.apply(o); probably best to ...
6 years, 3 months ago (2014-09-23 18:28:53 UTC) #13
Diego Pino
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js File test/mjsunit/array-length.js (right): https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode133 test/mjsunit/array-length.js:133: Array.prototype.toString.apply(o); On 2014/09/23 18:28:53, wingo wrote: > probably best ...
6 years, 3 months ago (2014-09-24 11:25:08 UTC) #14
wingo
Some more nits https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js File test/mjsunit/array-length.js (right): https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode161 test/mjsunit/array-length.js:161: Array.prototype.toLocaleString.apply(o); On 2014/09/24 11:25:08, Diego Pino ...
6 years, 2 months ago (2014-10-07 11:24:08 UTC) #16
Diego Pino
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js File test/mjsunit/array-length.js (right): https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode161 test/mjsunit/array-length.js:161: Array.prototype.toLocaleString.apply(o); On 2014/10/07 11:24:08, wingo wrote: > On 2014/09/24 ...
6 years, 2 months ago (2014-10-12 20:02:04 UTC) #17
wingo
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js File test/mjsunit/array-length.js (right): https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode161 test/mjsunit/array-length.js:161: Array.prototype.toLocaleString.apply(o); On 2014/10/12 20:02:03, Diego Pino wrote: > When ...
6 years, 2 months ago (2014-10-13 07:36:22 UTC) #18
Diego Pino
On 2014/10/13 07:36:22, wingo wrote: > Basically, yes. We can't allocate gigabytes of memory in ...
6 years, 2 months ago (2014-10-13 11:58:35 UTC) #19
wingo
Some more comments :) Sorry for the back and forth but there are a lot ...
6 years, 2 months ago (2014-10-13 12:27:58 UTC) #20
wingo
dpino is this one ready for another round of review? remember to comment when you ...
6 years, 2 months ago (2014-10-22 07:33:13 UTC) #21
Diego Pino
On 2014/10/22 07:33:13, wingo wrote: > dpino is this one ready for another round of ...
6 years, 2 months ago (2014-10-22 08:32:28 UTC) #22
wingo
Looking pretty good, just a couple of nits, and if you can test fill with ...
6 years, 2 months ago (2014-10-22 09:49:31 UTC) #23
Diego Pino
On 2014/10/22 09:49:31, wingo wrote: > Looking pretty good, just a couple of nits, and ...
6 years, 1 month ago (2014-10-27 18:22:29 UTC) #25
wingo
I think at this point LGTM, you need higher review powers :) Adding adamk to ...
6 years, 1 month ago (2014-10-28 08:38:03 UTC) #26
adamk
Sorry to pass the buck, but I don't have OWNERS authority myself. +rossberg, you reviewed ...
6 years, 1 month ago (2014-10-28 09:07:01 UTC) #28
rossberg
This looks good, my only concern is that it's a breaking change, and yet, not ...
6 years, 1 month ago (2014-10-29 09:27:01 UTC) #29
Diego Pino
On 2014/10/29 09:27:01, rossberg wrote: > This looks good, my only concern is that it's ...
6 years, 1 month ago (2014-10-29 10:08:21 UTC) #30
Diego Pino
This patch was pending to land after M40 branching. Perhaps it's necessary to review it ...
6 years ago (2014-12-07 15:21:59 UTC) #31
rossberg
On 2014/12/07 15:21:59, Diego Pino wrote: > This patch was pending to land after M40 ...
6 years ago (2014-12-08 10:32:55 UTC) #32
arv (Not doing code reviews)
On 2014/12/08 at 10:32:55, rossberg wrote: > On 2014/12/07 15:21:59, Diego Pino wrote: > > ...
6 years ago (2014-12-08 13:52:19 UTC) #33
rossberg
On 2014/12/08 13:52:19, arv wrote: > On 2014/12/08 at 10:32:55, rossberg wrote: > > On ...
6 years ago (2014-12-08 13:54:51 UTC) #34
Diego Pino
6 years ago (2014-12-10 12:26:50 UTC) #35
Diego Pino
On 2014/12/08 10:32:55, rossberg wrote: > Does that make sense? Redefining ToLengthFlagged() in src/harmony-array.js didn't ...
6 years ago (2014-12-10 12:28:43 UTC) #36
rossberg
On 2014/12/10 12:28:43, Diego Pino wrote: > On 2014/12/08 10:32:55, rossberg wrote: > > > ...
6 years ago (2014-12-10 13:36:25 UTC) #37
Diego Pino
On 2014/12/10 13:36:25, rossberg wrote: > I'm curious to know what crash you got. Your ...
6 years ago (2014-12-10 14:20:19 UTC) #38
caitp (gmail)
On 2014/12/10 14:20:19, Diego Pino wrote: > On 2014/12/10 13:36:25, rossberg wrote: > > > ...
6 years ago (2014-12-10 14:22:14 UTC) #39
rossberg
On 2014/12/10 14:22:14, caitp wrote: > On 2014/12/10 14:20:19, Diego Pino wrote: > > On ...
6 years ago (2014-12-10 14:52:54 UTC) #40
Diego Pino
On 2014/12/10 14:52:54, rossberg wrote: > On 2014/12/10 14:22:14, caitp wrote: > > Try `var ...
6 years ago (2014-12-10 15:08:57 UTC) #41
rossberg
I'm sorry about that. There seem to be some assumptions about builtins being immutable somewhere ...
6 years ago (2014-12-11 14:31:47 UTC) #42
caitp (gmail)
On 2014/12/11 14:31:47, rossberg wrote: > I'm sorry about that. There seem to be some ...
6 years ago (2014-12-11 14:38:23 UTC) #43
Diego Pino
On 2014/12/11 14:38:23, caitp wrote: > On 2014/12/11 14:31:47, rossberg wrote: > > I'm sorry ...
6 years ago (2014-12-12 09:25:38 UTC) #45
rossberg
lgtm
6 years ago (2014-12-12 11:47:12 UTC) #46
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/553623004/diff/290001/test/mjsunit/harmony/array-fill.js File test/mjsunit/harmony/array-fill.js (right): https://codereview.chromium.org/553623004/diff/290001/test/mjsunit/harmony/array-fill.js#newcode40 test/mjsunit/harmony/array-fill.js:40: Array.prototype.fill.apply(o, ["foo", 0, 9]); These could have used ...
6 years ago (2014-12-12 14:16:04 UTC) #47
Diego Pino
'v8_linux_rel' is failing. The problem seems to be that there are some tests executed with ...
6 years ago (2014-12-19 11:03:25 UTC) #51
Dmitry Lomov (no reviews)
On 2014/12/19 11:03:25, Diego Pino wrote: > 'v8_linux_rel' is failing. The problem seems to be ...
6 years ago (2014-12-19 11:12:01 UTC) #52
aperez
5 years, 3 months ago (2015-08-28 23:31:43 UTC) #59
I have agreed with Diego to take over his patch, and I have an updated CL posted
(unfortunately I am not the owner of this one, so I cannot update it...), here
it
goes:

  https://codereview.chromium.org/1309243003

Powered by Google App Engine
This is Rietveld 408576698