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

Unified Diff: src/compiler/graph-builder.h

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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 | « src/compiler/control-reducer.cc ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-builder.h
diff --git a/src/compiler/graph-builder.h b/src/compiler/graph-builder.h
index fd0f0559d704a7415045260f34f0183ef8577002..8374675ab62f9ea5b842a87a3cf4e301cad95d8b 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,6 @@ 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(); }
CommonOperatorBuilder* common() const { return common_; }
// Helper to wrap a Handle<T> into a Unique<T>.
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698