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

Issue 1546683002: [Interpreter] Add support for jumps using constants with wide operands. (Closed)

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

Description

[Interpreter] Add support for jumps using constants with wide operands. This increases the size of addressable constant pool entries for jumps to match other bytecodes using operands indexing the constant pool. This change also introduces reservations for constant pool entries. Reservations are used for forward jumps to ensure a constant pool entry will be available when the jump target (label) is bound and the jump is patched up in the bytecode array. BUG=v8:4280 LOG=N Committed: https://crrev.com/8109f63fd57317fef94c18824ee6ac187d9f5292 Cr-Commit-Position: refs/heads/master@{#33125}

Patch Set 1 #

Patch Set 2 : Additional tests. #

Patch Set 3 : Fix signed/unsigned comparison snafu in tests. #

Patch Set 4 : Compilation fix assignment to a narrower type. #

Patch Set 5 : Rationalize jumps in bytecode-graph-builder.cc. #

Total comments: 8

Patch Set 6 : Incorporate mythria's comments. #

Patch Set 7 : Simplify constant array builder. #

Patch Set 8 : msvc fixes. #

Patch Set 9 : nit. #

Patch Set 10 : Enable mjsunit/switch.js for ignition. #

Patch Set 11 : Rebase. #

Total comments: 33

Patch Set 12 : Incorporate comments from rmcilroy and a couple of other re-workings. #

Patch Set 13 : Tweak constant-array-builder-unittest.cc. #

Total comments: 18

Patch Set 14 : Rebase #

Patch Set 15 : Disable mjsunit/switch for ignition once again. Fails on ia32 in unrelated code (deopt?). #

Patch Set 16 : Incorporate comments on patchset 13. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1017 lines, -145 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/bytecode-graph-builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -4 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +61 lines, -28 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 14 15 7 chunks +18 lines, -11 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 14 15 7 chunks +121 lines, -76 lines 0 comments Download
M src/interpreter/bytecode-array-iterator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +17 lines, -2 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +22 lines, -2 lines 0 comments Download
A src/interpreter/constant-array-builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +97 lines, -0 lines 0 comments Download
A src/interpreter/constant-array-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +174 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 chunks +87 lines, -15 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-run-bytecode-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +40 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 13 14 15 4 chunks +82 lines, -4 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +37 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 11 12 13 2 chunks +16 lines, -0 lines 0 comments Download
A test/unittests/interpreter/constant-array-builder-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +225 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 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 13 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
oth
Benedikt, could you please take a look at the code and tests under compiler. Minimal ...
5 years ago (2015-12-23 12:44:02 UTC) #5
mythria
looks great. I have very minor comments. May be we could try /mjsunit/switch.js. This was ...
4 years, 12 months ago (2015-12-24 15:53:44 UTC) #6
Benedikt Meurer
LGTM on compiler.
4 years, 12 months ago (2015-12-27 07:38:04 UTC) #7
oth
Thanks both for looking at this. I'm going to write a different implementation of the ...
4 years, 12 months ago (2015-12-27 08:42:34 UTC) #8
oth
On 2015/12/24 15:53:44, mythria wrote: > looks great. I have very minor comments. > May ...
4 years, 11 months ago (2016-01-04 10:48:27 UTC) #9
mythria
lgtm
4 years, 11 months ago (2016-01-04 14:10:33 UTC) #10
rmcilroy
Looks good overall. I've not looked at tests yet though. https://codereview.chromium.org/1546683002/diff/200001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1546683002/diff/200001/src/interpreter/bytecode-array-builder.cc#newcode774 ...
4 years, 11 months ago (2016-01-04 17:05:48 UTC) #12
oth
Thanks for the ever excellent comments, all incorporated. Also dropped the ConstantArrayBuilder::ReservationToken and now just ...
4 years, 11 months ago (2016-01-05 09:30:08 UTC) #13
rmcilroy
LGTM with some final comments. https://codereview.chromium.org/1546683002/diff/200001/src/interpreter/constant-array-builder.cc File src/interpreter/constant-array-builder.cc (right): https://codereview.chromium.org/1546683002/diff/200001/src/interpreter/constant-array-builder.cc#newcode29 src/interpreter/constant-array-builder.cc:29: size_t ConstantArrayBuilder::ConstantArraySlice::free() const { ...
4 years, 11 months ago (2016-01-05 13:46:10 UTC) #14
oth
Thanks, all incorporated. https://codereview.chromium.org/1546683002/diff/240001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1546683002/diff/240001/src/interpreter/bytecode-array-builder.cc#newcode806 src/interpreter/bytecode-array-builder.cc:806: constant_array_builder()->DiscardReservedEntry(OperandSize::kByte); On 2016/01/05 13:46:10, rmcilroy wrote: ...
4 years, 11 months ago (2016-01-05 18:31:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1546683002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1546683002/300001
4 years, 11 months ago (2016-01-05 18:38:44 UTC) #18
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 11 months ago (2016-01-05 19:08:18 UTC) #20
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 19:09:21 UTC) #22
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/8109f63fd57317fef94c18824ee6ac187d9f5292
Cr-Commit-Position: refs/heads/master@{#33125}

Powered by Google App Engine
This is Rietveld 408576698