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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 9414003: Initial implementation of a flow-graph builder for Dart's AST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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
Index: runtime/vm/flow_graph_builder.h
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7d66f1d10bac5b801c16417e2f33185db38dc8f
--- /dev/null
+++ b/runtime/vm/flow_graph_builder.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_FLOW_GRAPH_BUILDER_H_
+#define VM_FLOW_GRAPH_BUILDER_H_
+
+#include "vm/allocation.h"
+
+namespace dart {
+
+class ParsedFunction;
+
+class FlowGraphBuilder: public ValueObject {
+ public:
+ explicit FlowGraphBuilder(const ParsedFunction& parsed_function)
+ : parsed_function_(parsed_function), bailout_reason_(NULL) { }
+
+ void BuildGraph();
+
+ const ParsedFunction& parsed_function() const { return parsed_function_; }
+
+ void Bailout(const char* reason) { bailout_reason_ = reason; }
+ void TraceBailout() const;
+
+ private:
+ const ParsedFunction& parsed_function_;
+ const char* bailout_reason_;
+};
+
+} // namespace dart
+
+#endif // VM_FLOW_GRAPH_BUILDER_H_

Powered by Google App Engine
This is Rietveld 408576698