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

Issue 1684113002: [Interpreter] Handle negative ints in generate-bytecode-expectations. (Closed)

Created:
4 years, 10 months ago by Stefano Sanfilippo
Modified:
4 years, 10 months ago
Reviewers:
oth, 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] Handle negative ints in generate-bytecode-expectations. The previous implementation used GetRawOperand(), which allows a nicely unified handling of all scalar types, but returns an unsigned type. Because of this, generate-bytecode-expectations couldn't properly handle negative numbers. This commit differentiate between different types of scalar operands and uses the appropriate getter from i::interpreter::BytecodeArrayIterator, thus correctly handling signed types where needed. Two new helpers have been added to i::interpreter::Bytecodes: * IsImmediateOperandType() * IsIndexOperandType() with the intuitive semantic. BUG=v8:4280 LOG=N Committed: https://crrev.com/8bfd4a5ac907c3ca1a68ccff181b88b9707dff67 Cr-Commit-Position: refs/heads/master@{#33874}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Reorder methods in i::interpreter::Bytecodes. #

Total comments: 2

Patch Set 3 : Move IsImmediateOperandType. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -8 lines) Patch
M src/interpreter/bytecodes.h View 1 2 chunks +9 lines, -3 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 1 chunk +16 lines, -3 lines 0 comments Download
M test/cctest/interpreter/generate-bytecode-expectations.cc View 1 chunk +14 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (12 generated)
Stefano Sanfilippo
Apparently GetRawOperand does not play nice with negative numbers, so here's the fix. PTAL.
4 years, 10 months ago (2016-02-10 14:45:38 UTC) #2
rmcilroy
Looks good, a couple of nits and a request please. https://codereview.chromium.org/1684113002/diff/1/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/1684113002/diff/1/src/interpreter/bytecodes.cc#newcode339 ...
4 years, 10 months ago (2016-02-10 15:26:12 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684113002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684113002/1
4 years, 10 months ago (2016-02-10 15:26:20 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_arm_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel/builds/13549)
4 years, 10 months ago (2016-02-10 15:49:11 UTC) #12
Stefano Sanfilippo
https://codereview.chromium.org/1684113002/diff/1/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/1684113002/diff/1/src/interpreter/bytecodes.cc#newcode339 src/interpreter/bytecodes.cc:339: } On 2016/02/10 15:26:12, rmcilroy wrote: > nit - ...
4 years, 10 months ago (2016-02-10 15:52:00 UTC) #13
Stefano Sanfilippo
https://codereview.chromium.org/1684113002/diff/1/test/cctest/interpreter/generate-bytecode-expectations.cc File test/cctest/interpreter/generate-bytecode-expectations.cc (right): https://codereview.chromium.org/1684113002/diff/1/test/cctest/interpreter/generate-bytecode-expectations.cc#newcode155 test/cctest/interpreter/generate-bytecode-expectations.cc:155: stream << bytecode_iter.GetCountOperand(op_index); On 2016/02/10 15:26:12, rmcilroy wrote: > ...
4 years, 10 months ago (2016-02-10 16:12:07 UTC) #14
rmcilroy
lgtm, thanks. https://codereview.chromium.org/1684113002/diff/20001/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/1684113002/diff/20001/src/interpreter/bytecodes.cc#newcode339 src/interpreter/bytecodes.cc:339: bool Bytecodes::IsImmediateOperandType(OperandType operand_type) { nit - move ...
4 years, 10 months ago (2016-02-10 16:43:14 UTC) #15
Stefano Sanfilippo
https://codereview.chromium.org/1684113002/diff/20001/src/interpreter/bytecodes.cc File src/interpreter/bytecodes.cc (right): https://codereview.chromium.org/1684113002/diff/20001/src/interpreter/bytecodes.cc#newcode339 src/interpreter/bytecodes.cc:339: bool Bytecodes::IsImmediateOperandType(OperandType operand_type) { On 2016/02/10 16:43:14, rmcilroy wrote: ...
4 years, 10 months ago (2016-02-10 16:49:30 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684113002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684113002/40001
4 years, 10 months ago (2016-02-10 18:11:37 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-10 18:35:41 UTC) #21
commit-bot: I haz the power
4 years, 10 months ago (2016-02-10 18:36:08 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8bfd4a5ac907c3ca1a68ccff181b88b9707dff67
Cr-Commit-Position: refs/heads/master@{#33874}

Powered by Google App Engine
This is Rietveld 408576698