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

Unified Diff: runtime/vm/il_printer.h

Issue 10857016: Refactored FlowGraphBuilder into a separate FlowGraph representation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revision based on Kevin's review. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/il_printer.h
diff --git a/runtime/vm/il_printer.h b/runtime/vm/il_printer.h
index 1160344ac92efa87af64d5f161cc384e574a5ccb..1e2a94eb87508a0fa45aaef39a063cdad95e7d86 100644
--- a/runtime/vm/il_printer.h
+++ b/runtime/vm/il_printer.h
@@ -5,6 +5,7 @@
#ifndef VM_IL_PRINTER_H_
#define VM_IL_PRINTER_H_
+#include "vm/flow_graph.h"
#include "vm/intermediate_language.h"
namespace dart {
@@ -34,11 +35,10 @@ class ParsedFunction;
// Graph printing.
class FlowGraphPrinter : public ValueObject {
public:
- FlowGraphPrinter(const Function& function,
- const GrowableArray<BlockEntryInstr*>& block_order,
+ FlowGraphPrinter(const FlowGraph& flow_graph,
bool print_locations = false)
- : function_(function),
- block_order_(block_order),
+ : function_(flow_graph.parsed_function().function()),
+ block_order_(flow_graph.reverse_postorder()),
print_locations_(print_locations) { }
// Print the instructions in a block terminated by newlines. Add "goto N"
@@ -63,9 +63,10 @@ class FlowGraphPrinter : public ValueObject {
class FlowGraphVisualizer : public ValueObject {
public:
- FlowGraphVisualizer(const Function& function,
- const GrowableArray<BlockEntryInstr*>& block_order)
- : function_(function), block_order_(block_order), indent_(0) { }
+ explicit FlowGraphVisualizer(const FlowGraph& flow_graph)
+ : function_(flow_graph.parsed_function().function()),
+ block_order_(flow_graph.reverse_postorder()),
+ indent_(0) { }
void PrintFunction();
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698