|
This is a first step towards reducing the number of stores/loads when suspending/resuming a generator.
Unfortunately, even for an empty generator, we still use 8 register for various things (try-finally, copies of generator object, parser-introduced temporaries). I will try to get rid of these in separate CLs.
Changes:
- SuspendGenerator bytecode now takes register list to save.
- ResumeGenerator was split into two bytecodes:
* Resume generator reads the state out and marks the generator as
'executing'.
* RestoreGeneratorRegisters reloads the registers from
the generator.
+ this required adding support for output register list.
- Introduced generator_object_ register in the bytecode generator.
* in subsequent CLs, I will make better use of it, the goal is
to get rid if the .generator_object local variable.
- Taught register optimizer to flush unassigned registers.
BUG= v8:6379
Review-Url: https://codereview.chromium.org/2894293003
Cr-Commit-Position: refs/heads/master@{#45675}
Committed: https://chromium.googlesource.com/v8/v8/+/f0645612c42d170b449ae65205fdcbf2c48ae57b
Total comments: 24
Total comments: 8
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+2105 lines, -1900 lines) |
Patch |
|
M |
src/compiler/bytecode-analysis.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/bytecode-analysis.cc
|
View
|
1
2
3
4
|
3 chunks |
+28 lines, -25 lines |
0 comments
|
Download
|
|
M |
src/compiler/bytecode-graph-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+24 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-operator.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+20 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-decoder.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
8 chunks |
+20 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-operands.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-register-optimizer.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-register-optimizer.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecodes.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter-assembler.h
|
View
|
1
2
3
4
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter-assembler.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+18 lines, -16 lines |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter-generator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
4 chunks |
+36 lines, -11 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
18 chunks |
+553 lines, -535 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
12 chunks |
+326 lines, -316 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Generators.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
12 chunks |
+342 lines, -327 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Modules.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
15 chunks |
+460 lines, -427 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
6 chunks |
+211 lines, -201 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/generators-reduced.js
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/regress-generators-resume.js
|
View
|
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-array-builder-unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/interpreter-assembler-unittest.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 50 (33 generated)
|