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

Issue 1225223004: Fix spread array inside array literal (Closed)

Created:
5 years, 5 months ago by adamk
Modified:
5 years, 5 months ago
Reviewers:
caitp (gmail), rossberg
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix spread array inside array literal During parsing, we now keep track of the first spread seen in an array literal (if any), and make use of that information when creating the FixedArray backing store representing the constant elements for array literal materialization. The old code tried to do this by setting the generated JSArray's length in ArrayLiteral::BuildConstantElements(), but that Array length is never read by the rest of the literal materialization code (it always uses the length of the FixedArray backing store). BUG=v8:4298 LOG=n Committed: https://crrev.com/24e982816f75cb91b96b6c3aafbc6ab741afd118 Cr-Commit-Position: refs/heads/master@{#29684}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Rebaselined #

Patch Set 3 : Break after first spread #

Patch Set 4 : Store first spread index during parsing #

Patch Set 5 : Add flag #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -14 lines) Patch
M src/ast.h View 1 2 3 3 chunks +15 lines, -5 lines 0 comments Download
M src/ast.cc View 1 2 3 3 chunks +6 lines, -6 lines 0 comments Download
M src/preparser.h View 1 2 3 4 chunks +10 lines, -1 line 0 comments Download
A + test/mjsunit/harmony/regress/regress-4298.js View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225223004/1
5 years, 5 months ago (2015-07-14 05:32:50 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/4163)
5 years, 5 months ago (2015-07-14 05:36:26 UTC) #4
caitp (gmail)
https://codereview.chromium.org/1225223004/diff/1/src/ast.cc File src/ast.cc (right): https://codereview.chromium.org/1225223004/diff/1/src/ast.cc#newcode514 src/ast.cc:514: constants_length = i; Looks like you just need a ...
5 years, 5 months ago (2015-07-14 05:49:03 UTC) #6
caitp (gmail)
https://codereview.chromium.org/1225223004/diff/1/src/ast.cc File src/ast.cc (right): https://codereview.chromium.org/1225223004/diff/1/src/ast.cc#newcode514 src/ast.cc:514: constants_length = i; On 2015/07/14 05:49:03, caitp wrote: > ...
5 years, 5 months ago (2015-07-14 05:49:53 UTC) #7
caitp (gmail)
On 2015/07/14 05:49:53, caitp wrote: > https://codereview.chromium.org/1225223004/diff/1/src/ast.cc > File src/ast.cc (right): > > https://codereview.chromium.org/1225223004/diff/1/src/ast.cc#newcode514 > ...
5 years, 5 months ago (2015-07-14 05:55:13 UTC) #8
adamk
https://codereview.chromium.org/1225223004/diff/1/src/ast.cc File src/ast.cc (right): https://codereview.chromium.org/1225223004/diff/1/src/ast.cc#newcode514 src/ast.cc:514: constants_length = i; On 2015/07/14 05:49:53, caitp wrote: > ...
5 years, 5 months ago (2015-07-14 16:04:56 UTC) #9
adamk
Okay, this is ready for review. Different approach this time, which avoids extra looping through ...
5 years, 5 months ago (2015-07-14 18:53:57 UTC) #11
rossberg
lgtm
5 years, 5 months ago (2015-07-15 08:51:36 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225223004/80001
5 years, 5 months ago (2015-07-15 15:14:12 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 5 months ago (2015-07-15 15:16:13 UTC) #15
commit-bot: I haz the power
5 years, 5 months ago (2015-07-15 15:16:20 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/24e982816f75cb91b96b6c3aafbc6ab741afd118
Cr-Commit-Position: refs/heads/master@{#29684}

Powered by Google App Engine
This is Rietveld 408576698