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

Issue 606017: Introduce builtin for Array.shift 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.shift function. Committed: http://code.google.com/p/v8/source/detail?r=3853

Patch Set 1 #

Total comments: 6

Patch Set 2 : Next round of Mads' comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -7 lines) Patch
M src/bootstrapper.cc View 1 1 chunk +9 lines, -7 lines 0 comments Download
M src/builtins.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/builtins.cc View 1 1 chunk +37 lines, -0 lines 0 comments Download
A test/mjsunit/array-shift.js View 1 1 chunk +46 lines, -0 lines 1 comment Download

Messages

Total messages: 5 (0 generated)
antonm
Mads, sorry, I messed up with git cl and it opened a new issue for ...
10 years, 10 months ago (2010-02-12 14:07:52 UTC) #1
Mads Ager (chromium)
LGTM Are the cases with no elements on the object itself and elements present/absent in ...
10 years, 10 months ago (2010-02-15 07:47:02 UTC) #2
antonm
Thanks, Mads. I've added a test into array-shift.js which is pretty much the test from ...
10 years, 10 months ago (2010-02-15 09:15:22 UTC) #3
Mads Ager (chromium)
Still looks good. http://codereview.chromium.org/606017/diff/4001/3005 File test/mjsunit/array-shift.js (right): http://codereview.chromium.org/606017/diff/4001/3005#newcode45 test/mjsunit/array-shift.js:45: assertEquals(array[7], Array.prototype[7]); I guess after shifting ...
10 years, 10 months ago (2010-02-15 11:10:54 UTC) #4
antonm
10 years, 10 months ago (2010-02-15 11:30:46 UTC) #5
Sure, please, have a look at http://codereview.chromium.org/596116/show

I'll add corresponding test for Array.unshift as well.

On 2010/02/15 11:10:54, Mads Ager wrote:
> Still looks good.
> 
> http://codereview.chromium.org/606017/diff/4001/3005
> File test/mjsunit/array-shift.js (right):
> 
> http://codereview.chromium.org/606017/diff/4001/3005#newcode45
> test/mjsunit/array-shift.js:45: assertEquals(array[7], Array.prototype[7]);
> I guess after shifting array[6] is interesting as well?

Powered by Google App Engine
This is Rietveld 408576698