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

Issue 666883009: Change SmartMove no-op behavior to match SimpleMove (and ES6 spec) (Closed)

Created:
6 years, 2 months ago by adamk
Modified:
6 years, 2 months ago
CC:
v8-dev, Toon Verwaest
Project:
v8
Visibility:
Public.

Description

Change SmartMove no-op behavior to match SimpleMove (and ES6 spec) The previous behavior, which caused Array.prototype.unshift() (with no args) to have side-effects, no longer matches the spec (ES6 changed the no-arg behavior in April 2014). The new SmartMove behavior is also compatible with current versions of Firefox. This is a baby step towards getting rid of SmartMove; it isolates the test change in this patch, instead of lumping it in confusingly with all the other test updates necessary for moving away from SmartMove. R=dslomov@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=24854

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -15 lines) Patch
M src/array.js View 1 chunk +2 lines, -0 lines 0 comments Download
M test/mjsunit/array-unshift.js View 4 chunks +11 lines, -15 lines 2 comments Download

Messages

Total messages: 12 (3 generated)
adamk
6 years, 2 months ago (2014-10-21 21:42:25 UTC) #2
Michael Starzinger
https://codereview.chromium.org/666883009/diff/1/test/mjsunit/array-unshift.js File test/mjsunit/array-unshift.js (right): https://codereview.chromium.org/666883009/diff/1/test/mjsunit/array-unshift.js#newcode67 test/mjsunit/array-unshift.js:67: assertFalse(array.hasOwnProperty(0)); I am not convinced that this is actually ...
6 years, 2 months ago (2014-10-22 08:45:50 UTC) #3
adamk
Looks like ES6 changed Array.prototype.unshift() (with no arguments) to be side-effect free on the elements ...
6 years, 2 months ago (2014-10-22 17:15:35 UTC) #5
adamk
Looks like this was changed in April: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#april_27_2014_draft_rev_24 "Adjust Array.prototype.reverse and Array.prototype.unshift to eliminate several ...
6 years, 2 months ago (2014-10-22 17:19:46 UTC) #6
Michael Starzinger
If this was an intended change to the spec then I am of course fine ...
6 years, 2 months ago (2014-10-22 17:32:26 UTC) #8
adamk
Updated CL description to s/nonsensical/non-spec-compliant/
6 years, 2 months ago (2014-10-22 18:31:19 UTC) #9
adamk
Also tested on (trunk) JSC, which has the ES6 behavior.
6 years, 2 months ago (2014-10-22 22:37:34 UTC) #10
Dmitry Lomov (no reviews)
lgtm, looks legit :)
6 years, 2 months ago (2014-10-23 09:11:48 UTC) #11
adamk
6 years, 2 months ago (2014-10-23 17:46:50 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 24854 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698