|
[ignition] desugar async functions/generators/modules in BytecodeGenerator
Implements the "port-desugaring-to-Ignition" aspects of
https://codereview.chromium.org/2654423004/ without fixing
the actual bug, and leaving much of the AST desugaring (particularly
the desugaring of ReturnStatement and AwaitExpression) alone. This
should create a way to fix the actual bug with a much smaller change.
The `DeclareGeneratorObjectVar` and `DeclarePromiseVar` methods are
added to Scope to make these variables accessible to the
BytecodeGenerator. They will be removed once the Parser no longer
implements the desugaring of Await, Yield*, and function.sent.
This includes the changes of moving the assignment of a named
FunctionExpression's variable to BytecodeGenerator, and additionally
separating the AST desugaring of non-simple parameters, to allow
BytecodeGenerator to control how and when they are visited (necessary
for putting them inside of a generated try/catch/finally block, as
the case may be).
Finally, some helpers are added to the BytecodeGenerator to allow the
generation of Yield code, and try/catch/finally code without AST
desugaring.
BUG= v8:4280
R=neis@chromium.org, rmcilroy@chromium.org, littledan@chromium.org
Total comments: 20
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1351 lines, -595 lines) |
Patch |
|
M |
src/ast/ast.h
|
View
|
1
2
3
4
|
3 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-expression-rewriter.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-numbering.cc
|
View
|
1
2
3
4
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ast/scopes.h
|
View
|
1
2
3
4
|
5 chunks |
+24 lines, -1 line |
0 comments
|
Download
|
|
M |
src/ast/scopes.cc
|
View
|
1
2
3
4
|
3 chunks |
+30 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/bailout-reason.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.h
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.h
|
View
|
1
2
3
4
5
|
3 chunks |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
2
3
4
5
|
11 chunks |
+478 lines, -90 lines |
4 comments
|
Download
|
|
M |
src/interpreter/control-flow-builders.h
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.h
|
View
|
1
2
3
4
|
5 chunks |
+6 lines, -22 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.cc
|
View
|
1
2
3
4
|
11 chunks |
+30 lines, -164 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser-base.h
|
View
|
1
2
3
4
|
11 chunks |
+22 lines, -51 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.h
|
View
|
1
2
3
4
|
7 chunks |
+7 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
A |
test/cctest/interpreter/bytecode_expectations/AsyncFunctions.golden
|
View
|
1
2
3
4
5
|
1 chunk |
+479 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Generators.golden
|
View
|
1
2
3
4
|
22 chunks |
+85 lines, -102 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Modules.golden
|
View
|
1
2
3
4
|
35 chunks |
+83 lines, -138 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/test-bytecode-generator.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
Total messages: 32 (18 generated)
|