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

Issue 618002: Introduce Array.splice builtin. (Closed)

Created:
10 years, 10 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Introduce Array.splice builtin. Committed: http://code.google.com/p/v8/source/detail?r=3885

Patch Set 1 #

Total comments: 14

Patch Set 2 : Addressing comments #

Patch Set 3 : After the move #

Patch Set 4 : Proper restore #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -19 lines) Patch
M src/array.js View 2 chunks +3 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/builtins.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/builtins.cc View 1 3 chunks +150 lines, -17 lines 0 comments Download
A test/mjsunit/array-splice.js View 1 2 1 chunk +270 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
antonm
Mads, the last of Array methods for you. Some notes. 1) I found that our ...
10 years, 10 months ago (2010-02-17 07:10:22 UTC) #1
Lasse Reichstein
http://codereview.chromium.org/618002/diff/1/3 File src/builtins.cc (right): http://codereview.chromium.org/618002/diff/1/3#newcode533 src/builtins.cc:533: // Not conformant, but that's the way it is ...
10 years, 10 months ago (2010-02-17 09:11:45 UTC) #2
antonm
Thanks a lot, Lasse. I too checked if Safari behaves this way. Mildly curious who ...
10 years, 10 months ago (2010-02-17 09:29:32 UTC) #3
Mads Ager (chromium)
LGTM with comments. http://codereview.chromium.org/618002/diff/1/3 File src/builtins.cc (right): http://codereview.chromium.org/618002/diff/1/3#newcode533 src/builtins.cc:533: // Not conformant, but that's the ...
10 years, 10 months ago (2010-02-17 09:44:22 UTC) #4
antonm
10 years, 10 months ago (2010-02-17 10:33:10 UTC) #5
Thanks a lot, Lasse and Mads.

Submitting with proper svn move.

http://codereview.chromium.org/618002/diff/1/3
File src/builtins.cc (right):

http://codereview.chromium.org/618002/diff/1/3#newcode533
src/builtins.cc:533: // Not conformant, but that's the way it is currently.
On 2010/02/17 09:44:23, Mads Ager wrote:
> Could you use the comment from array.js which is more informative than this
one?
> 
>   // SpiderMonkey and JSC return undefined in the case where no
>   // arguments are given instead of using the implicit undefined
>   // arguments.  This does not follow ECMA-262, but we do the same for
>   // compatibility.
> 

Done and updated in regard of TraceMonkey which started to return empty array. 
KJS renamed to JSC as per IM discussion.

http://codereview.chromium.org/618002/diff/1/3#newcode534
src/builtins.cc:534: if (n_arguments == 0)
On 2010/02/17 09:44:23, Mads Ager wrote:
> Braces around the body or single-line.

Done.

http://codereview.chromium.org/618002/diff/1/3#newcode548
src/builtins.cc:548: // but current implementation behaves differently.
On 2010/02/17 09:44:23, Mads Ager wrote:
> Again, please use the more informative comment from array.js for this one.

Done.

http://codereview.chromium.org/618002/diff/1/5
File test/mjsunit/array-functions-prototype-2.js (right):

http://codereview.chromium.org/618002/diff/1/5#newcode34
test/mjsunit/array-functions-prototype-2.js:34: var LARGE = 40000000;
On 2010/02/17 09:44:23, Mads Ager wrote:
> Please make sure that this test does not take a long time.  This should be a
> simple test that can be run very quickly.  Benchmarks are fine but should not
be
> part of the mjsunit test suite.

As discussed by IM, I just attempted to rename this file, didn't modify it.

Powered by Google App Engine
This is Rietveld 408576698