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

Issue 19115002: Don't use StoreIC_ArrayLength on frozen arrays (Closed)

Created:
7 years, 5 months ago by adamk
Modified:
7 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Don't use StoreIC_ArrayLength on frozen arrays The code previously assumed that an array with fast properties must have a writable length property. But Object.freeze() now exposes a way to make length read-only without moving the object into slow mode. This patch simply adds a !is_frozen check to the IC code. Any future optimizations to attribute-setting on JSArrays will need to make similar accomodations. R=danno BUG=v8:2711, 259548 Committed: https://code.google.com/p/v8/source/detail?r=15651

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -7 lines) Patch
M src/ic.cc View 1 chunk +4 lines, -2 lines 5 comments Download
A + test/mjsunit/regress/regress-2711.js View 1 chunk +6 lines, -5 lines 1 comment Download

Messages

Total messages: 10 (0 generated)
adamk
7 years, 5 months ago (2013-07-12 20:24:57 UTC) #1
ihab.awad
https://codereview.chromium.org/19115002/diff/1/test/mjsunit/regress/regress-2711.js File test/mjsunit/regress/regress-2711.js (right): https://codereview.chromium.org/19115002/diff/1/test/mjsunit/regress/regress-2711.js#newcode30 test/mjsunit/regress/regress-2711.js:30: a.push(2); Fwiw, my testing on 30.0.1562.0 canary showed that: ...
7 years, 5 months ago (2013-07-12 20:41:29 UTC) #2
adamk
On 2013/07/12 20:41:29, ihab.awad wrote: > https://codereview.chromium.org/19115002/diff/1/test/mjsunit/regress/regress-2711.js > File test/mjsunit/regress/regress-2711.js (right): > > https://codereview.chromium.org/19115002/diff/1/test/mjsunit/regress/regress-2711.js#newcode30 > ...
7 years, 5 months ago (2013-07-12 20:53:28 UTC) #3
Mark Miller
https://codereview.chromium.org/19115002/diff/1/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/19115002/diff/1/src/ic.cc#newcode1672 src/ic.cc:1672: !receiver->map()->is_frozen()) { The issue also arises if the .length ...
7 years, 5 months ago (2013-07-12 20:56:57 UTC) #4
adamk
https://codereview.chromium.org/19115002/diff/1/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/19115002/diff/1/src/ic.cc#newcode1672 src/ic.cc:1672: !receiver->map()->is_frozen()) { On 2013/07/12 20:56:57, Mark Miller wrote: > ...
7 years, 5 months ago (2013-07-12 21:00:09 UTC) #5
ihab.awad
Np, just pointing out what I saw but you know the ramifications best, of course! ...
7 years, 5 months ago (2013-07-12 21:02:00 UTC) #6
Mark Miller
https://codereview.chromium.org/19115002/diff/1/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/19115002/diff/1/src/ic.cc#newcode1672 src/ic.cc:1672: !receiver->map()->is_frozen()) { Gotcha. Thanks for the clarification. Does that ...
7 years, 5 months ago (2013-07-12 21:08:02 UTC) #7
Mark Miller
https://codereview.chromium.org/19115002/diff/1/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/19115002/diff/1/src/ic.cc#newcode1672 src/ic.cc:1672: !receiver->map()->is_frozen()) { On 2013/07/12 21:08:02, Mark Miller wrote: > ...
7 years, 5 months ago (2013-07-12 21:09:39 UTC) #8
adamk
https://codereview.chromium.org/19115002/diff/1/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/19115002/diff/1/src/ic.cc#newcode1672 src/ic.cc:1672: !receiver->map()->is_frozen()) { On 2013/07/12 21:08:02, Mark Miller wrote: > ...
7 years, 5 months ago (2013-07-12 21:14:28 UTC) #9
danno
7 years, 5 months ago (2013-07-14 22:02:45 UTC) #10
lgtm

Powered by Google App Engine
This is Rietveld 408576698