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

Issue 1698403002: [Interpreter] generate-bytecode-expectations improvements. (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] generate-bytecode-expectations improvements. A few options and features have been added to the tool: * an output file might be specified using --output=file.name * a shortcut when the output file is also the input, which is handy when fixing golden files, --rebaseline. * the input snippet might be optionally not wrapped in a top function, or not executed after compilation (--no-wrap and --no-execute). * the name of the wrapper can be configured using --wrapper-name=foo The same options can be configured via setters on the usual BytecodeExpectationsPrinter. The output file now includes all the relevant flags to reproduce it when running again through the tool (usually with --rebaseline). In particular, when running in --rebaseline mode, options from the file header will override options specified in the command line. A couple of other fixes and improvements: * description of the handlers is now emitted (closing the TODO). * the snippet is now correctly unquoted when double quotes are used. * special registers (closure, context etc.) are now emitted as such, instead of displaying their numeric value. * the tool can now process top level code as well. BUG=v8:4280 LOG=N Committed: https://crrev.com/d2187182a7ef2183d27c245a99317444d88cd78f Cr-Commit-Position: refs/heads/master@{#34152}

Patch Set 1 #

Total comments: 37

Patch Set 2 : First round of reviews. #

Patch Set 3 : Capital letters where missing. #

Patch Set 4 : Change API, always emit banner, clearer I/O handling. #

Patch Set 5 : Reorganize help message, --fix => --rebaseline for real. #

Total comments: 18

Patch Set 6 : Remove const qual from methods where we don't need it. #

Patch Set 7 : Revert removal of const qualifier. #

Patch Set 8 : Second review. #

Patch Set 9 : Rename input_file to input_file_handle to make the difference with input_stream more evident. #

Patch Set 10 : Reverting to the old API, remove PrepareI/OStream. #

Total comments: 6

Patch Set 11 : Consolidate ProgramOptions, remove unneeded setters. #

Patch Set 12 : Re-validate options only upon change. #

Patch Set 13 : Ignore runtime errors. #

Patch Set 14 : rename wrapper-name, merge kInteger and kDouble, top level code. #

Total comments: 4

Patch Set 15 : Renaming #

Unified diffs Side-by-side diffs Delta from patch set Stats (+318 lines, -86 lines) Patch
M test/cctest/interpreter/bytecode-expectations-printer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +41 lines, -9 lines 0 comments Download
M test/cctest/interpreter/bytecode-expectations-printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 12 chunks +66 lines, -31 lines 0 comments Download
M test/cctest/interpreter/generate-bytecode-expectations.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +211 lines, -46 lines 0 comments Download

Messages

Total messages: 45 (21 generated)
Stefano Sanfilippo
I've added a few features to generate-bytecode-expectations and the associated library file that will be ...
4 years, 10 months ago (2016-02-16 15:54:04 UTC) #4
rmcilroy
Looks good, couple of comments. https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode52 test/cctest/interpreter/bytecode-expectations-printer.cc:52: return result; Not using ...
4 years, 10 months ago (2016-02-16 16:43:49 UTC) #5
Stefano Sanfilippo
https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode52 test/cctest/interpreter/bytecode-expectations-printer.cc:52: return result; On 2016/02/16 16:43:48, rmcilroy wrote: > Not ...
4 years, 10 months ago (2016-02-16 20:28:27 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698403002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698403002/40001
4 years, 10 months ago (2016-02-16 20:43:39 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-16 21:07:43 UTC) #13
rmcilroy
https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode118 test/cctest/interpreter/bytecode-expectations-printer.cc:118: stream << '(' << register_value.index() << ')'; On 2016/02/16 ...
4 years, 10 months ago (2016-02-17 10:17:00 UTC) #14
Stefano Sanfilippo
https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/1/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode118 test/cctest/interpreter/bytecode-expectations-printer.cc:118: stream << '(' << register_value.index() << ')'; On 2016/02/17 ...
4 years, 10 months ago (2016-02-17 14:32:29 UTC) #15
rmcilroy
https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode56 test/cctest/interpreter/bytecode-expectations-printer.cc:56: (void)result; Just remove result variable and instead call: CHECK(!script->Run(isolate_->GetCurrentContext().IsEmpty()) ...
4 years, 10 months ago (2016-02-17 15:24:09 UTC) #17
Stefano Sanfilippo
https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode56 test/cctest/interpreter/bytecode-expectations-printer.cc:56: (void)result; On 2016/02/17 15:24:08, rmcilroy wrote: > Just remove ...
4 years, 10 months ago (2016-02-17 16:40:50 UTC) #18
rmcilroy
https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode334 test/cctest/interpreter/bytecode-expectations-printer.cc:334: stream << "#\n# Autogenerated by generate-bytecode-expectations\n#\n\n"; On 2016/02/17 16:40:49, ...
4 years, 10 months ago (2016-02-17 17:06:36 UTC) #19
Stefano Sanfilippo
https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc File test/cctest/interpreter/bytecode-expectations-printer.cc (right): https://codereview.chromium.org/1698403002/diff/80001/test/cctest/interpreter/bytecode-expectations-printer.cc#newcode334 test/cctest/interpreter/bytecode-expectations-printer.cc:334: stream << "#\n# Autogenerated by generate-bytecode-expectations\n#\n\n"; On 2016/02/17 17:06:36, ...
4 years, 10 months ago (2016-02-17 17:31:18 UTC) #20
rmcilroy
LGTM once last few comments are addressed. https://codereview.chromium.org/1698403002/diff/170001/test/cctest/interpreter/bytecode-expectations-printer.h File test/cctest/interpreter/bytecode-expectations-printer.h (right): https://codereview.chromium.org/1698403002/diff/170001/test/cctest/interpreter/bytecode-expectations-printer.h#newcode59 test/cctest/interpreter/bytecode-expectations-printer.h:59: void reset_top_function_name() ...
4 years, 10 months ago (2016-02-18 09:58:34 UTC) #21
Stefano Sanfilippo
https://codereview.chromium.org/1698403002/diff/170001/test/cctest/interpreter/bytecode-expectations-printer.h File test/cctest/interpreter/bytecode-expectations-printer.h (right): https://codereview.chromium.org/1698403002/diff/170001/test/cctest/interpreter/bytecode-expectations-printer.h#newcode59 test/cctest/interpreter/bytecode-expectations-printer.h:59: void reset_top_function_name() { On 2016/02/18 09:58:33, rmcilroy wrote: > ...
4 years, 10 months ago (2016-02-18 11:14:13 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698403002/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698403002/210001
4 years, 10 months ago (2016-02-18 11:29:32 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-18 11:49:56 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698403002/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698403002/230001
4 years, 10 months ago (2016-02-18 14:39:40 UTC) #29
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-18 15:39:56 UTC) #31
rmcilroy
LGTM with a renaming suggestion. https://codereview.chromium.org/1698403002/diff/250001/test/cctest/interpreter/bytecode-expectations-printer.h File test/cctest/interpreter/bytecode-expectations-printer.h (right): https://codereview.chromium.org/1698403002/diff/250001/test/cctest/interpreter/bytecode-expectations-printer.h#newcode55 test/cctest/interpreter/bytecode-expectations-printer.h:55: void set_top_level_code(bool top_level_code) { ...
4 years, 10 months ago (2016-02-19 11:50:04 UTC) #33
Stefano Sanfilippo
https://codereview.chromium.org/1698403002/diff/250001/test/cctest/interpreter/bytecode-expectations-printer.h File test/cctest/interpreter/bytecode-expectations-printer.h (right): https://codereview.chromium.org/1698403002/diff/250001/test/cctest/interpreter/bytecode-expectations-printer.h#newcode55 test/cctest/interpreter/bytecode-expectations-printer.h:55: void set_top_level_code(bool top_level_code) { On 2016/02/19 11:50:04, rmcilroy wrote: ...
4 years, 10 months ago (2016-02-19 11:58:06 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698403002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698403002/270001
4 years, 10 months ago (2016-02-19 12:14:20 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-19 12:33:34 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698403002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698403002/270001
4 years, 10 months ago (2016-02-19 12:34:56 UTC) #41
commit-bot: I haz the power
Committed patchset #15 (id:270001)
4 years, 10 months ago (2016-02-19 12:36:35 UTC) #43
commit-bot: I haz the power
4 years, 10 months ago (2016-02-19 12:37:26 UTC) #45
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/d2187182a7ef2183d27c245a99317444d88cd78f
Cr-Commit-Position: refs/heads/master@{#34152}

Powered by Google App Engine
This is Rietveld 408576698