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

Issue 2321533003: Properly handle holes following spreads in array literals (Closed)

Created:
4 years, 3 months ago by adamk
Modified:
4 years, 3 months ago
Reviewers:
nickie, Jakob Kummerow
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Properly handle holes following spreads in array literals Before this change, the spread desugaring would naively call `%AppendElement($R, the_hole)` and in some cases $R would have a non-holey elements kind, putting the array into the bad state of exposing holes to author code. This patch avoids calling %AppendElement with a hole, instead simply incrementing $R.length when it sees a hole in the literal (this is safe because $R is known to be an Array). The existing logic for elements transitions takes care of giving the array a holey ElementsKind. BUG=chromium:644215 Committed: https://crrev.com/e4273007b613950845e92d479485ec737eb61185 Cr-Commit-Position: refs/heads/master@{#39294}

Patch Set 1 #

Patch Set 2 : Add a CHECK to %AppendElement #

Total comments: 2

Patch Set 3 : Less auto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -9 lines) Patch
M src/ast/ast-value-factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/parsing/parser.cc View 1 2 1 chunk +26 lines, -9 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
A test/mjsunit/regress/regress-crbug-644215.js View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
adamk
4 years, 3 months ago (2016-09-07 19:14:17 UTC) #4
nickie
lgtm
4 years, 3 months ago (2016-09-08 08:29:47 UTC) #7
Jakob Kummerow
lgtm https://codereview.chromium.org/2321533003/diff/20001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2321533003/diff/20001/src/parsing/parser.cc#newcode5072 src/parsing/parser.cc:5072: auto length_property = factory()->NewProperty( nit: I strongly prefer ...
4 years, 3 months ago (2016-09-08 09:58:56 UTC) #8
adamk
https://codereview.chromium.org/2321533003/diff/20001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2321533003/diff/20001/src/parsing/parser.cc#newcode5072 src/parsing/parser.cc:5072: auto length_property = factory()->NewProperty( On 2016/09/08 09:58:56, Jakob Kummerow ...
4 years, 3 months ago (2016-09-08 17:43:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2321533003/40001
4 years, 3 months ago (2016-09-08 17:43:41 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-08 18:50:21 UTC) #13
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 18:50:51 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e4273007b613950845e92d479485ec737eb61185
Cr-Commit-Position: refs/heads/master@{#39294}

Powered by Google App Engine
This is Rietveld 408576698