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

Unified Diff: src/compiler/graph.h

Issue 767733002: De-generify the GenericGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased again. Created 6 years, 1 month 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 | « src/compiler/generic-node-inl.h ('k') | src/compiler/graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph.h
diff --git a/src/compiler/graph.h b/src/compiler/graph.h
index 71fa3e73ed03b4979994ea395923a830992ee20d..2cdfc5dd27d4eb5a67121315a697d88075914d57 100644
--- a/src/compiler/graph.h
+++ b/src/compiler/graph.h
@@ -19,7 +19,7 @@ namespace compiler {
class GraphDecorator;
-class Graph : public GenericGraph<Node> {
+class Graph : public ZoneObject {
public:
explicit Graph(Zone* zone);
@@ -63,6 +63,16 @@ class Graph : public GenericGraph<Node> {
template <class Visitor>
void VisitNodeInputsFromEnd(Visitor* visitor);
+ Zone* zone() const { return zone_; }
+ Node* start() const { return start_; }
+ Node* end() const { return end_; }
+
+ void SetStart(Node* start) { start_ = start; }
+ void SetEnd(Node* end) { end_ = end; }
+
+ NodeId NextNodeID() { return next_node_id_++; }
+ NodeId NodeCount() const { return next_node_id_; }
+
void Decorate(Node* node);
void AddDecorator(GraphDecorator* decorator) {
@@ -80,8 +90,14 @@ class Graph : public GenericGraph<Node> {
template <typename State>
friend class NodeMarker;
+ Zone* zone_;
+ Node* start_;
+ Node* end_;
Mark mark_max_;
+ NodeId next_node_id_;
ZoneVector<GraphDecorator*> decorators_;
+
+ DISALLOW_COPY_AND_ASSIGN(Graph);
};
« no previous file with comments | « src/compiler/generic-node-inl.h ('k') | src/compiler/graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698