Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Issue 2793923002: [Interpreter] Optimize code of the form 'if (x === undefined)'. (Closed)

Created:
3 years, 8 months ago by rmcilroy
Modified:
3 years, 8 months ago
CC:
v8-reviews_googlegroups.com, rmcilroy
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[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

Patch Set 1 #

Patch Set 2 : Rebase #

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:

Messages

Total messages: 18 (13 generated)
rmcilroy
Mythri, PTAL at interpreter/ Benedikt, PTAL at compiler/
3 years, 8 months ago (2017-04-03 11:25:10 UTC) #6
Benedikt Meurer
Awesome, thanks! LGTM on compiler.
3 years, 8 months ago (2017-04-03 11:27:15 UTC) #7
mythria
Nice. lgtm.
3 years, 8 months ago (2017-04-03 12:48:02 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2793923002/20001
3 years, 8 months ago (2017-04-03 14:15:38 UTC) #15
commit-bot: I haz the power
3 years, 8 months ago (2017-04-03 14:17:24 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/f4f58e31c1edf87ecbfc13f41718bc118f8...

Powered by Google App Engine
This is Rietveld 408576698