Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(23)

Issue 1125183008: [es6] Spread in array literals (Closed)

Created:
4 years, 5 months ago by arv (Not doing code reviews)
Modified:
4 years, 4 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[es6] Spread in array literals This allows you to put iterables into your array literals and the will get spread into the array. let x = [0, ...range(1, 3)]; // [0, 1, 2] This is done by treating the array literal up to the first spread element as usual, including using a boiler plate array, and then appending the remaining expressions and rest expressions. BUG=v8:3018 LOG=N Committed: https://crrev.com/9502e91adbed48a546463aa848656d07619d14e6 Cr-Commit-Position: refs/heads/master@{#28534}

Patch Set 1 #

Patch Set 2 : Use SetElementsLength #

Patch Set 3 : More test... classifier... rename flag #

Patch Set 4 : TF mostly works #

Patch Set 5 : Fix TF and deopts #

Patch Set 6 : Full codegen all ports #

Total comments: 4

Patch Set 7 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+547 lines, -49 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 3 4 5 3 chunks +33 lines, -5 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 2 3 4 5 3 chunks +33 lines, -5 lines 0 comments Download
M src/ast.cc View 1 2 chunks +14 lines, -6 lines 0 comments Download
M src/ast-numbering.cc View 1 chunk +5 lines, -1 line 0 comments Download
M src/bailout-reason.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M src/builtins.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 1 chunk +46 lines, -5 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M src/hydrogen.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 3 chunks +34 lines, -6 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 1 2 3 4 5 3 chunks +34 lines, -5 lines 0 comments Download
M src/mips64/full-codegen-mips64.cc View 1 2 3 4 5 3 chunks +34 lines, -5 lines 0 comments Download
M src/parser.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M src/preparser.h View 1 2 3 4 4 chunks +10 lines, -3 lines 0 comments Download
M src/runtime.js View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M src/typing.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 5 6 3 chunks +34 lines, -6 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 3 chunks +50 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/spread-array.js View 1 2 3 4 1 chunk +179 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (3 generated)
arv (Not doing code reviews)
Use SetElementsLength
4 years, 5 months ago (2015-05-19 23:30:57 UTC) #1
arv (Not doing code reviews)
Dmitry. I wanted to unblock you from spread patterns but this still needs a little ...
4 years, 5 months ago (2015-05-20 01:00:51 UTC) #3
Dmitry Lomov (no reviews)
Here is a design I came up with yesterday evening (nothing done yet): for [a, ...
4 years, 5 months ago (2015-05-20 07:06:46 UTC) #4
Michael Starzinger
On 2015/05/20 07:06:46, Dmitry Lomov (chromium) wrote: > Here is a design I came up ...
4 years, 5 months ago (2015-05-20 07:59:17 UTC) #5
Dmitry Lomov (no reviews)
On 2015/05/20 07:59:17, Michael Starzinger wrote: > On 2015/05/20 07:06:46, Dmitry Lomov (chromium) wrote: > ...
4 years, 5 months ago (2015-05-20 08:15:14 UTC) #6
Dmitry Lomov (no reviews)
(so re CL I am not blocked on this for destructuring in any way - ...
4 years, 5 months ago (2015-05-20 08:37:32 UTC) #7
Dmitry Lomov (no reviews)
CL looks good to me (not sure about why TF still tries to optimize though) ...
4 years, 5 months ago (2015-05-20 11:57:41 UTC) #8
Michael Starzinger
On 2015/05/20 01:00:51, arv wrote: > Dmitry. I wanted to unblock you from spread patterns ...
4 years, 5 months ago (2015-05-20 13:52:49 UTC) #9
arv (Not doing code reviews)
More test... classifier... rename flag
4 years, 5 months ago (2015-05-20 14:54:49 UTC) #10
arv (Not doing code reviews)
TF mostly works
4 years, 5 months ago (2015-05-20 16:57:41 UTC) #11
arv (Not doing code reviews)
Fix TF and deopts
4 years, 5 months ago (2015-05-20 17:53:27 UTC) #12
arv (Not doing code reviews)
Full codegen all ports
4 years, 5 months ago (2015-05-20 18:46:27 UTC) #13
arv (Not doing code reviews)
PTAL This is now ready.
4 years, 5 months ago (2015-05-20 19:07:58 UTC) #14
Dmitry Lomov (no reviews)
Neat! lgtm % TF (looks good to me too but I am no expert) https://codereview.chromium.org/1125183008/diff/100001/src/ia32/full-codegen-ia32.cc ...
4 years, 5 months ago (2015-05-20 20:36:33 UTC) #15
arv (Not doing code reviews)
cleanup
4 years, 5 months ago (2015-05-20 20:56:48 UTC) #16
arv (Not doing code reviews)
I'll wait for Michael to take a final look. Michael, if everything looks good feel ...
4 years, 5 months ago (2015-05-20 20:57:44 UTC) #17
Michael Starzinger
LGTM on the TurboFan part. I'll CQ it.
4 years, 4 months ago (2015-05-21 08:06:12 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1125183008/120001
4 years, 4 months ago (2015-05-21 08:07:21 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 4 months ago (2015-05-21 08:09:15 UTC) #22
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/9502e91adbed48a546463aa848656d07619d14e6 Cr-Commit-Position: refs/heads/master@{#28534}
4 years, 4 months ago (2015-05-21 08:09:37 UTC) #23
arv (Not doing code reviews)
On 2015/05/21 08:06:12, Michael Starzinger wrote: > LGTM on the TurboFan part. I'll CQ it. ...
4 years, 4 months ago (2015-05-21 12:46:30 UTC) #24
arv (Not doing code reviews)
4 years, 4 months ago (2015-05-29 14:05:30 UTC) #25
Message was sent while issue was closed.
On 2015/05/20 01:00:51, arv wrote:

> - Crankshaft?

I looked into Crankshaft and decided not to do it for the following reasons:

- for-of is not supported in Crankshaft
- Calling builtins is not supported Crankshaft

Powered by Google App Engine
This is Rietveld 408576698