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

Issue 1613163002: [interpreter] Wide register support. (Closed)

Created:
4 years, 11 months ago by oth
Modified:
4 years, 11 months ago
Reviewers:
rmcilroy
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] Wide register support. This increases the size of register operands to be 16-bit. Not all bytecodes have wide register variants, so when they are needed a register translator will copy them into a small area reserved at the top of the 8-bit register range and these registers are supplied as arguments to the bytecode with 8-bit operands. This is non-intrusive for typical bytecode where the number of registers is less than 120. For bytecodes with wide register operands (above the window) their index needs to be translated to avoid the reserved translation window. Enables splay.js to run in Octane and a handful of mjsunit tests. BUG=v8:4280, v8:4675 LOG=NO Committed: https://crrev.com/19df7a20f0d50e3b6a8db39c39ee1cd157c56d25 Cr-Commit-Position: refs/heads/master@{#33516}

Patch Set 1 #

Patch Set 2 : A pair of tests. #

Patch Set 3 : Added tests, fixed off-by-one error in register indicies. #

Total comments: 20

Patch Set 4 : Compilation fix. #

Patch Set 5 : nit. #

Patch Set 6 : Bump start of translation window by 1. #

Patch Set 7 : Back to implicit register translation. #

Patch Set 8 : Rebase #

Patch Set 9 : Compilation fixes for gcc/msvc. #

Total comments: 16

Patch Set 10 : Incorporate patch set 9 comments. #

Patch Set 11 : Incorporate missed comment. #

Patch Set 12 : Unbreak tests. #

Total comments: 20

Patch Set 13 : Rebase and apply new formatting rules. #

Patch Set 14 : Incorporate comments on patch set 12. #

Patch Set 15 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1367 lines, -97 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +24 lines, -6 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 20 chunks +173 lines, -30 lines 0 comments Download
M src/interpreter/bytecode-array-iterator.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/interpreter/bytecode-traits.h View 1 2 3 4 5 6 6 chunks +68 lines, -1 line 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +22 lines, -15 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +52 lines, -9 lines 0 comments Download
A src/interpreter/register-translator.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +120 lines, -0 lines 0 comments Download
A src/interpreter/register-translator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +148 lines, -0 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +276 lines, -9 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +145 lines, -0 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +1 line, -5 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -8 lines 0 comments Download
M test/unittests/interpreter/bytecodes-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +71 lines, -11 lines 0 comments Download
A test/unittests/interpreter/register-translator-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +254 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
oth
This is a snapshot of the register translation. PTAL to see the approach is agreeable. ...
4 years, 11 months ago (2016-01-21 14:59:20 UTC) #2
rmcilroy
Overall looks great. I've not looked at the tests yet. A couple of suggestions. https://codereview.chromium.org/1613163002/diff/40001/src/interpreter/bytecode-array-builder.cc ...
4 years, 11 months ago (2016-01-22 17:50:57 UTC) #3
rmcilroy
Overall looks great. I've not looked at the tests yet. A couple of suggestions.
4 years, 11 months ago (2016-01-22 17:50:57 UTC) #4
oth
Thanks for the feedback. I was doubtful of the approach in this CL and the ...
4 years, 11 months ago (2016-01-24 10:19:00 UTC) #5
rmcilroy
Looks great, just a few comments. https://codereview.chromium.org/1613163002/diff/160001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1613163002/diff/160001/src/interpreter/bytecode-array-builder.cc#newcode203 src/interpreter/bytecode-array-builder.cc:203: register_translator()->UntranslateRegisters(); Not sure ...
4 years, 11 months ago (2016-01-25 12:12:05 UTC) #6
oth
Thanks, all incorporated. https://codereview.chromium.org/1613163002/diff/160001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1613163002/diff/160001/src/interpreter/bytecode-array-builder.cc#newcode203 src/interpreter/bytecode-array-builder.cc:203: register_translator()->UntranslateRegisters(); On 2016/01/25 12:12:05, rmcilroy wrote: ...
4 years, 11 months ago (2016-01-25 16:51:57 UTC) #7
rmcilroy
A few more nits, but LGTM. Land it before you change your mind! ;) https://codereview.chromium.org/1613163002/diff/220001/src/interpreter/bytecode-array-builder.cc ...
4 years, 11 months ago (2016-01-26 11:01:45 UTC) #8
oth
Comments incorporated. One seemed to better to leave as-is and one seemed to be a ...
4 years, 11 months ago (2016-01-26 13:39:57 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1613163002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1613163002/280001
4 years, 11 months ago (2016-01-26 13:54:00 UTC) #13
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 11 months ago (2016-01-26 13:55:34 UTC) #15
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/19df7a20f0d50e3b6a8db39c39ee1cd157c56d25 Cr-Commit-Position: refs/heads/master@{#33516}
4 years, 11 months ago (2016-01-26 13:56:22 UTC) #17
rmcilroy
4 years, 11 months ago (2016-01-26 14:08:07 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/1613163002/diff/220001/src/interpreter/byteco...
File src/interpreter/bytecode-array-builder.cc (right):

https://codereview.chromium.org/1613163002/diff/220001/src/interpreter/byteco...
src/interpreter/bytecode-array-builder.cc:1390: DCHECK(operand_index != 0);
On 2016/01/26 13:39:56, oth wrote:
> On 2016/01/26 11:01:45, rmcilroy wrote:
> > Dead code?
> 
> Assuming this is flagging the same dead code as the previous comment.

Yes it was. Weirdly the tool told me it failed to create this comment multiple
times, so I created the one above :).

https://codereview.chromium.org/1613163002/diff/220001/src/interpreter/byteco...
src/interpreter/bytecode-array-builder.cc:1394: if (operand_index > 0) {
On 2016/01/26 13:39:57, oth wrote:
> On 2016/01/26 11:01:45, rmcilroy wrote:
> > Just DCHECK operand_index > 0 here (and below) ? 
> 
> Leaving as-is. This method should be consistent and return true or false for
all
> validity conditions. It's use is wrapped by a DCHECK.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698