|
Assign unique IDs to FunctionLiterals
They're supposed to be stable across several parse passes, so we'll also
store them in the associated SharedFunctionInfos
To achieve this, the PreParser and Parser need to generated the same number of
FunctionLiterals. To achieve this, we teach the PreParser about desuggaring of
class literals.
For regular functions, the function IDs are assigned in the order they occur in
the source. For arrow functions, however, we only know that it's an arrow function
after parsing the parameter list, and so the ID assigned to the arrow function is
larger than the IDs assigned to functions defined in the parameter list. This
implies that we have to reset the function ID counter to before the parameter list
when re-parsing an arrow function. To be able to do this, we store the number of
function literals found in the parameter list of arrow functions as well.
BUG= v8:5589
Committed: https://crrev.com/cfebe6034c39562681c11e8381448f4934972429
Cr-Commit-Position: refs/heads/master@{#41309}
Total comments: 11
Total comments: 7
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+241 lines, -48 lines) |
Patch |
|
M |
BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ast/ast.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
7 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
|
A |
src/ast/ast-function-literal-id-reindexer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+36 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/ast/ast-function-literal-id-reindexer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler-dispatcher/compiler-dispatcher-job.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/factory.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+11 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/parsing/parse-info.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/parsing/parse-info.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
12 chunks |
+38 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser-base.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
16 chunks |
+46 lines, -23 lines |
1 comment
|
Download
|
|
M |
src/parsing/preparse-data.h
|
View
|
1
2
3
4
5
6
|
4 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparse-data.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/parsing/preparse-data-format.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/parsing/preparser.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+18 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-function.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/v8.gyp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 51 (36 generated)
|