|
[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}
Total comments: 4
|
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
|
Total messages: 25 (3 generated)
|