|
[ESnext] Implement Object spread
This patch adds parsing of spread object property.
-- Changes ParsePropertyName to parse Token::ELLIPSIS.
-- Throws if rest is encountered by setting a pattern error.
-- Adds a new PropertyKind enum (SPREAD)
-- Adds a new ObjectLiteralProperty::kind (SPREAD)
-- Adds a new harmony-object-spread flag and protects the parser code
with it.
-- Adds a new runtime function called CopyDataProperties
-- Does not add any support for this feature in fullcodegen.
-- Ignition calls out to a runtime function CopyDataProperties to
perform spread operation.
-- Move FastAssign from builtins-objects.cc to objects.cc
-- Refactor Builtin_ObjectAssign to use SetOrCopyDataProperties
Object rest will be implemented in a follow on patch.
BUG= v8:5549
Review-Url: https://codereview.chromium.org/2606833002
Cr-Commit-Position: refs/heads/master@{#42102}
Committed: https://chromium.googlesource.com/v8/v8/+/a40b7172fe7d255b4ce3055d4ca7cdbbb3f09fb6
Total comments: 26
Total comments: 17
Total comments: 16
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+445 lines, -123 lines) |
Patch |
|
M |
src/ast/ast.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ast/ast.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/ast/prettyprinter.cc
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/bootstrapper.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/builtins/builtins-object.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+3 lines, -118 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/flag-definitions.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/full-codegen/arm/full-codegen-arm.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm64/full-codegen-arm64.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ia32/full-codegen-ia32.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips/full-codegen-mips.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips64/full-codegen-mips64.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ppc/full-codegen-ppc.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/s390/full-codegen-s390.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x64/full-codegen-x64.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x87/full-codegen-x87.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1 chunk |
+149 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser-base.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
7 chunks |
+35 lines, -1 line |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-object.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-parsing.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+93 lines, -1 line |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/object-spread-basic.js
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+111 lines, -0 lines |
0 comments
|
Download
|
Total messages: 71 (57 generated)
|