|
[Interpreter] Optimize code of the form 'if (x === undefined)'.
Translates code of the form 'if (x === undefined)' into the JumpIfUndefined
bytecode, and similarly for comparisons with null. Also adds bytecodes for
JumpIfNotUndefined / Null.
Moves the peephole optimization for CompareUndefined out of the peephole
optimizer and into the BytecodeGenerator, having the side-effect of enabling
it for comparisons with undefined on both side of the compare operation.
BUG= v8:6107
Review-Url: https://codereview.chromium.org/2793923002
Cr-Commit-Position: refs/heads/master@{#44341}
Committed: https://chromium.googlesource.com/v8/v8/+/f4f58e31c1edf87ecbfc13f41718bc118f812d79
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+700 lines, -235 lines) |
Patch |
|
M |
src/compiler/bytecode-graph-builder.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/bytecode-graph-builder.cc
|
View
|
1
|
4 chunks |
+26 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.h
|
View
|
1
|
2 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.cc
|
View
|
1
|
3 chunks |
+78 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-writer.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
|
2 chunks |
+34 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-peephole-optimizer.cc
|
View
|
|
2 chunks |
+0 lines, -24 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-peephole-table.h
|
View
|
|
1 chunk |
+10 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecodes.h
|
View
|
1
|
6 chunks |
+22 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter-generator.cc
|
View
|
1
|
3 chunks |
+72 lines, -50 lines |
0 comments
|
Download
|
|
M |
src/interpreter/mkpeephole.cc
|
View
|
|
1 chunk |
+0 lines, -22 lines |
0 comments
|
Download
|
|
A |
test/cctest/interpreter/bytecode_expectations/CompareNil.golden
|
View
|
|
1 chunk |
+289 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/CompareTypeOf.golden
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
|
View
|
1
|
12 chunks |
+30 lines, -34 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ForOf.golden
|
View
|
1
|
12 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden
|
View
|
|
8 chunks |
+24 lines, -20 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Generators.golden
|
View
|
1
|
3 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/test-bytecode-generator.cc
|
View
|
|
1 chunk |
+55 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-array-builder-unittest.cc
|
View
|
1
|
4 chunks |
+18 lines, -12 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
|
View
|
|
1 chunk |
+0 lines, -19 lines |
0 comments
|
Download
|
Dependent Patchsets:
Total messages: 18 (13 generated)
|