Chromium Code Reviews| Index: src/compiler/graph-builder.h |
| diff --git a/src/compiler/graph-builder.h b/src/compiler/graph-builder.h |
| index fd0f0559d704a7415045260f34f0183ef8577002..6f530884da706599a197e6786182a3ae0336f80b 100644 |
| --- a/src/compiler/graph-builder.h |
| +++ b/src/compiler/graph-builder.h |
| @@ -25,7 +25,8 @@ class Node; |
| // A common base class for anything that creates nodes in a graph. |
| class GraphBuilder { |
| public: |
| - explicit GraphBuilder(Graph* graph) : graph_(graph) {} |
| + GraphBuilder(Isolate* isolate, Graph* graph) |
| + : isolate_(isolate), graph_(graph) {} |
| virtual ~GraphBuilder() {} |
| Node* NewNode(const Operator* op, bool incomplete = false) { |
| @@ -68,6 +69,7 @@ class GraphBuilder { |
| return MakeNode(op, value_input_count, value_inputs, incomplete); |
| } |
| + Isolate* isolate() const { return isolate_; } |
| Graph* graph() const { return graph_; } |
| protected: |
| @@ -76,6 +78,7 @@ class GraphBuilder { |
| Node** value_inputs, bool incomplete) = 0; |
| private: |
| + Isolate* isolate_; |
| Graph* graph_; |
| }; |
| @@ -85,7 +88,7 @@ class GraphBuilder { |
| // StubGraphBuilder). |
| class StructuredGraphBuilder : public GraphBuilder { |
| public: |
| - StructuredGraphBuilder(Zone* zone, Graph* graph, |
| + StructuredGraphBuilder(Isolate* isolate, Zone* zone, Graph* graph, |
| CommonOperatorBuilder* common); |
| ~StructuredGraphBuilder() OVERRIDE {} |
| @@ -131,7 +134,7 @@ class StructuredGraphBuilder : public GraphBuilder { |
| Zone* graph_zone() const { return graph()->zone(); } |
| Zone* local_zone() const { return local_zone_; } |
| - Isolate* isolate() const { return graph_zone()->isolate(); } |
| + Isolate* isolate() const { return isolate_; } |
|
Michael Starzinger
2015/01/23 14:21:10
Can be dropped since it now just overrides GraphBu
danno
2015/01/23 14:45:20
Done.
|
| CommonOperatorBuilder* common() const { return common_; } |
| // Helper to wrap a Handle<T> into a Unique<T>. |
| @@ -151,6 +154,8 @@ class StructuredGraphBuilder : public GraphBuilder { |
| CommonOperatorBuilder* common_; |
| Environment* environment_; |
| + Isolate* isolate_; |
|
Michael Starzinger
2015/01/23 14:21:10
Can be dropped now since it shadows GraphBuilder::
danno
2015/01/23 14:45:20
Done.
|
| + |
| // Zone local to the builder for data not leaking into the graph. |
| Zone* local_zone_; |