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

Issue 1406983010: [Interpreter] Ensure ToBoolean bytecodes are correctly emitted at the start of basic blocks (Closed)

Created:
5 years, 1 month ago by rmcilroy
Modified:
5 years, 1 month ago
Reviewers:
oth, mythria
CC:
v8-reviews_googlegroups.com, oth, rmcilroy
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Interpreter] Ensure ToBoolean bytecodes are correctly emitted at the start of basic blocks Existing code was assuming that 'lexical' blocks were the same as basic blocks, therefore code which emitted jumps within a lexical block (e.g., logical or) would in some occassions incorrectly omit a necessary ToBoolean. This change removes Enter/LeaveBlock from BytecodeArrayBuilder and instead tracks basic blocks via label bindings and jump operations. The change also ensures we don't emit dead code at the end of a basic block, and adds tests of the edge cases. BUG=v8:4280 LOG=N Committed: https://crrev.com/2e1bdea8ad80dc63fb5ed19396934db801e69fde Cr-Commit-Position: refs/heads/master@{#31741}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -105 lines) Patch
M src/interpreter/bytecode-array-builder.h View 2 chunks +1 line, -3 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 6 chunks +15 lines, -7 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 4 chunks +2 lines, -5 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 12 chunks +204 lines, -60 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 4 chunks +4 lines, -8 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 7 chunks +38 lines, -22 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406983010/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406983010/1
5 years, 1 month ago (2015-11-02 17:39:12 UTC) #2
rmcilroy
Orion / Mythri, PTAL, thanks.
5 years, 1 month ago (2015-11-02 17:39:17 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-02 17:56:45 UTC) #6
oth
lgtm. Very elegant. A handful of missing semi-colon nits. https://codereview.chromium.org/1406983010/diff/1/test/cctest/interpreter/test-bytecode-generator.cc File test/cctest/interpreter/test-bytecode-generator.cc (right): https://codereview.chromium.org/1406983010/diff/1/test/cctest/interpreter/test-bytecode-generator.cc#newcode4941 test/cctest/interpreter/test-bytecode-generator.cc:4941: ...
5 years, 1 month ago (2015-11-02 20:45:59 UTC) #7
mythria
lgtm https://codereview.chromium.org/1406983010/diff/1/test/cctest/interpreter/test-bytecode-generator.cc File test/cctest/interpreter/test-bytecode-generator.cc (right): https://codereview.chromium.org/1406983010/diff/1/test/cctest/interpreter/test-bytecode-generator.cc#newcode1678 test/cctest/interpreter/test-bytecode-generator.cc:1678: }, May be we can have another test ...
5 years, 1 month ago (2015-11-03 11:02:00 UTC) #8
rmcilroy
https://codereview.chromium.org/1406983010/diff/1/test/cctest/interpreter/test-bytecode-generator.cc File test/cctest/interpreter/test-bytecode-generator.cc (right): https://codereview.chromium.org/1406983010/diff/1/test/cctest/interpreter/test-bytecode-generator.cc#newcode1678 test/cctest/interpreter/test-bytecode-generator.cc:1678: }, On 2015/11/03 11:01:59, mythria wrote: > May be ...
5 years, 1 month ago (2015-11-03 11:10:12 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406983010/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406983010/20001
5 years, 1 month ago (2015-11-03 11:10:36 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-03 11:27:57 UTC) #13
commit-bot: I haz the power
5 years, 1 month ago (2015-11-03 11:28:17 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2e1bdea8ad80dc63fb5ed19396934db801e69fde
Cr-Commit-Position: refs/heads/master@{#31741}

Powered by Google App Engine
This is Rietveld 408576698