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

Issue 604059: Introduce builtin for Array.slice function. (Closed)

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

Description

Introduce builtin for Array.slice function. Committed: http://code.google.com/p/v8/source/detail?r=3871

Patch Set 1 #

Patch Set 2 : Correct message #

Patch Set 3 : Do checks in the builtin itself #

Total comments: 6

Patch Set 4 : Next round #

Total comments: 4

Patch Set 5 : Next round #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -2 lines) Patch
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 2 3 4 1 chunk +104 lines, -0 lines 0 comments Download
M src/execution.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ic.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
A test/mjsunit/array-slice.js View 1 2 3 4 1 chunk +162 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
antonm
Mads, may you have a look? Warning: it's ugly. Let me explain the reason for ...
10 years, 10 months ago (2010-02-15 19:43:51 UTC) #1
antonm
Mads, now reworked to do type checks in the builtin itself. May you have a ...
10 years, 10 months ago (2010-02-16 07:06:22 UTC) #2
Mads Ager (chromium)
http://codereview.chromium.org/604059/diff/4001/4003 File src/builtins.cc (right): http://codereview.chromium.org/604059/diff/4001/4003#newcode431 src/builtins.cc:431: if (fast_slice == JSFunction::cast(table->get(index + 2))->code()) { This seems ...
10 years, 10 months ago (2010-02-16 09:03:03 UTC) #3
antonm
Thanks a lot for comments, Mads. Here go/lem: http://compute3.aar:9013/golem/r3859-v8-antonm-array-slice-vs-3859-v8.html http://codereview.chromium.org/604059/diff/4001/4003 File src/builtins.cc (right): http://codereview.chromium.org/604059/diff/4001/4003#newcode431 src/builtins.cc:431: ...
10 years, 10 months ago (2010-02-16 11:00:49 UTC) #4
Mads Ager (chromium)
LGTM http://codereview.chromium.org/604059/diff/3002/3004 File src/builtins.cc (right): http://codereview.chromium.org/604059/diff/3002/3004#newcode427 src/builtins.cc:427: Object* r = Heap::LookupAsciiSymbol("ArraySlice"); Since you are using ...
10 years, 10 months ago (2010-02-16 11:32:12 UTC) #5
antonm
10 years, 10 months ago (2010-02-16 12:04:04 UTC) #6
Thanks a lot, Mads.  Submitting.

http://codereview.chromium.org/604059/diff/3002/3004
File src/builtins.cc (right):

http://codereview.chromium.org/604059/diff/3002/3004#newcode427
src/builtins.cc:427: Object* r = Heap::LookupAsciiSymbol("ArraySlice");
On 2010/02/16 11:32:12, Mads Ager wrote:
> Since you are using handles here already, you should use
> Factory::LookupAsciiSymbol and avoid the failure check.

Done.  And I switched to GetProperty from handles.

http://codereview.chromium.org/604059/diff/3002/3008
File test/mjsunit/array-slice.js (right):

http://codereview.chromium.org/604059/diff/3002/3008#newcode28
test/mjsunit/array-slice.js:28: // Check that shifting array of holes keeps it
as array of holes
On 2010/02/16 11:32:12, Mads Ager wrote:
> shifting -> slicing

Thanks a lot, done.

Powered by Google App Engine
This is Rietveld 408576698