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

Issue 1671863002: [Interpreter] Initial generate-bytecode-expectations implementation. (Closed)

Created:
4 years, 10 months ago by Stefano Sanfilippo
Modified:
4 years, 10 months ago
Reviewers:
oth, rmcilroy
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Interpreter] Initial generate-bytecode-expectations implementation. generate-bytecode-expectations is a tool intended to work together with test/cctest/test-bytecode-generator.cc in order to produce a meaningful diff between testcases and the actual bytecode being emitted. It does so by parsing and compiling Javascript to bytecode, constructing the same data structure in the testcase and then running a textual diff between the expected (i.e. the one encoded in the unit test) and actual (i.e. the one built from the compiler output) representation. This commit is a first step in this direction, achieving just the first half of what we desire. At the moment, bytecodechecker can: * take a code snippet from the command line and emit the expected structure. * adhere to the same formatting rules of the test cases (this one is important for text diff and for copy and pasting too) Still to do: * parse unit tests: + extract code snippets + indent the code to match the input test case + allow flexibility in the input format + try to recognize and work around some macro magic (i.e. REPEAT_127) * emit the representation of the constant pool and handlers vector * run a textual diff BUG=v8:4280 LOG=N Committed: https://crrev.com/d3604cdb6808789e5f60b3f56f0ec2e992fad56c Cr-Commit-Position: refs/heads/master@{#33863}

Patch Set 1 #

Total comments: 43

Patch Set 2 : Addressing review comments. #

Total comments: 37

Patch Set 3 : Remove the "static" qualifier from func in the anonymous namespace. #

Patch Set 4 : Hopefully fix the Windows declspec issue. #

Patch Set 5 : Second round of fixes. #

Total comments: 6

Patch Set 6 : Get rid of RemoveTrailingSpaces, more obvious comment. #

Patch Set 7 : Rename tool to generate-bytecode-expectations. #

Patch Set 8 : Remove all references to bytecodechecker. #

Patch Set 9 : Use std::string as buffer in QuoteCString. #

Patch Set 10 : Finally convinced git cl format to respect our style. #

Total comments: 4

Patch Set 11 : Rename V8StringFromUTF8 and function_body #

Patch Set 12 : Moved to interpreter/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -0 lines) Patch
M test/cctest/cctest.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +21 lines, -0 lines 0 comments Download
A test/cctest/interpreter/generate-bytecode-expectations.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +294 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (17 generated)
Stefano Sanfilippo
Please have a look at this cl.
4 years, 10 months ago (2016-02-05 10:43:57 UTC) #2
oth
Looks very good. A few nits, but nothing major. https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc File test/cctest/bytecodechecker.cc (right): https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc#newcode13 test/cctest/bytecodechecker.cc:13: ...
4 years, 10 months ago (2016-02-05 11:41:05 UTC) #3
rmcilroy
Looking good. A couple of more comments. https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc File test/cctest/bytecodechecker.cc (right): https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc#newcode46 test/cctest/bytecodechecker.cc:46: v8::Isolate *isolate_; ...
4 years, 10 months ago (2016-02-05 13:49:51 UTC) #4
Stefano Sanfilippo
Thanks for the feedback, I have amended all the issues you pointed out. PTAL. https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc ...
4 years, 10 months ago (2016-02-08 13:18:34 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671863002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671863002/20001
4 years, 10 months ago (2016-02-08 13:20:56 UTC) #7
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
4 years, 10 months ago (2016-02-08 13:20:58 UTC) #9
rmcilroy
Looks great, a few more comments and suggestions. https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc File test/cctest/bytecodechecker.cc (right): https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc#newcode21 test/cctest/bytecodechecker.cc:21: void ...
4 years, 10 months ago (2016-02-08 13:55:32 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671863002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671863002/20001
4 years, 10 months ago (2016-02-08 14:05:09 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671863002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671863002/60001
4 years, 10 months ago (2016-02-08 15:03:40 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-08 15:21:25 UTC) #16
Stefano Sanfilippo
I addressed all the issues, and I still have a couple of comments. PTAL https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc ...
4 years, 10 months ago (2016-02-09 10:09:58 UTC) #17
oth
This is looking pretty good. A couple of optional nits, but fine as is. Leave ...
4 years, 10 months ago (2016-02-09 11:40:35 UTC) #18
rmcilroy
Looks great, I'll L-G-T-M once you've renamed the tool (and the cc file and any ...
4 years, 10 months ago (2016-02-09 11:58:24 UTC) #19
Stefano Sanfilippo
I finally got git cl format to stop moving stars around. https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc File test/cctest/bytecodechecker.cc (right): ...
4 years, 10 months ago (2016-02-09 16:52:51 UTC) #24
rmcilroy
Looks great, lgtm. Thanks. https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc File test/cctest/bytecodechecker.cc (right): https://codereview.chromium.org/1671863002/diff/1/test/cctest/bytecodechecker.cc#newcode21 test/cctest/bytecodechecker.cc:21: void *Allocate(size_t length) override { ...
4 years, 10 months ago (2016-02-10 09:18:01 UTC) #25
Stefano Sanfilippo
https://codereview.chromium.org/1671863002/diff/180001/test/cctest/generate-bytecode-expectations.cc File test/cctest/generate-bytecode-expectations.cc (right): https://codereview.chromium.org/1671863002/diff/180001/test/cctest/generate-bytecode-expectations.cc#newcode81 test/cctest/generate-bytecode-expectations.cc:81: v8::Local<v8::String> MakeV8LocalStringFromUTF8(v8::Isolate* isolate, On 2016/02/10 09:18:00, rmcilroy wrote: > ...
4 years, 10 months ago (2016-02-10 11:00:15 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671863002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671863002/200001
4 years, 10 months ago (2016-02-10 11:00:33 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671863002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671863002/220001
4 years, 10 months ago (2016-02-10 11:04:25 UTC) #33
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 10 months ago (2016-02-10 11:26:19 UTC) #35
commit-bot: I haz the power
4 years, 10 months ago (2016-02-10 11:26:42 UTC) #37
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/d3604cdb6808789e5f60b3f56f0ec2e992fad56c
Cr-Commit-Position: refs/heads/master@{#33863}

Powered by Google App Engine
This is Rietveld 408576698