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

Issue 10407031: Add IR printing into a supplied buffer. (Closed)

Created:
8 years, 7 months ago by Florian Schneider
Modified:
8 years, 7 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Vyacheslav Egorov (Google), Ivan Posva
Visibility:
Public.

Description

Add IR printing into a supplied buffer and formatted comments on x64. This change refactors printing function for instructions so that they can be used for different purposes like printing to stdout (what FlowGraphPrinter currently does), creating code comments for the disassembler, or in the future dumping the IR into a file. I added an abstract interface to iterate over the inputs of an computation: InputCount and InputAt. This is only an intermediate step likely to change in the future. For that I had to bring back the [] operator for zero-operand instructions. Committed: https://code.google.com/p/dart/source/detail?r=7731

Patch Set 1 #

Total comments: 17

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -282 lines) Patch
M vm/flow_graph_builder.cc View 1 2 chunks +6 lines, -1 line 0 comments Download
M vm/flow_graph_compiler_x64.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M vm/flow_graph_compiler_x64.cc View 1 4 chunks +11 lines, -1 line 0 comments Download
M vm/il_printer.h View 1 2 1 chunk +23 lines, -21 lines 0 comments Download
M vm/il_printer.cc View 1 1 chunk +177 lines, -244 lines 0 comments Download
M vm/intermediate_language.h View 1 34 chunks +110 lines, -5 lines 0 comments Download
M vm/intermediate_language.cc View 1 4 chunks +11 lines, -10 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Florian Schneider
8 years, 7 months ago (2012-05-17 22:37:36 UTC) #1
srdjan
http://codereview.chromium.org/10407031/diff/1/vm/flow_graph_builder.h File vm/flow_graph_builder.h (right): http://codereview.chromium.org/10407031/diff/1/vm/flow_graph_builder.h#newcode28 vm/flow_graph_builder.h:28: return &postorder_block_entries_; Why not const reference result (and make ...
8 years, 7 months ago (2012-05-17 22:59:22 UTC) #2
Florian Schneider
Addressed feedback and added EmitComment to the compiler. https://chromiumcodereview.appspot.com/10407031/diff/1/vm/flow_graph_builder.h File vm/flow_graph_builder.h (right): https://chromiumcodereview.appspot.com/10407031/diff/1/vm/flow_graph_builder.h#newcode28 vm/flow_graph_builder.h:28: return ...
8 years, 7 months ago (2012-05-18 00:28:38 UTC) #3
srdjan
LGTM http://codereview.chromium.org/10407031/diff/2002/vm/il_printer.h File vm/il_printer.h (right): http://codereview.chromium.org/10407031/diff/2002/vm/il_printer.h#newcode24 vm/il_printer.h:24: intptr_t size_; Add DISALLOW_xxxxx http://codereview.chromium.org/10407031/diff/2002/vm/il_printer.h#newcode24 vm/il_printer.h:24: intptr_t size_; ...
8 years, 7 months ago (2012-05-18 00:51:34 UTC) #4
Florian Schneider
8 years, 7 months ago (2012-05-18 01:04:37 UTC) #5
https://chromiumcodereview.appspot.com/10407031/diff/2002/vm/il_printer.h
File vm/il_printer.h (right):

https://chromiumcodereview.appspot.com/10407031/diff/2002/vm/il_printer.h#new...
vm/il_printer.h:24: intptr_t size_;
On 2012/05/18 00:51:34, srdjan wrote:
> size_ is const?

Done.

https://chromiumcodereview.appspot.com/10407031/diff/2002/vm/il_printer.h#new...
vm/il_printer.h:24: intptr_t size_;
On 2012/05/18 00:51:34, srdjan wrote:
> Add DISALLOW_xxxxx

Done.

Powered by Google App Engine
This is Rietveld 408576698