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

Unified Diff: src/compiler/control-reducer.cc

Issue 663333003: [turbofan] use ZonePool in most places in the compiler pipeline a temp zone is used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 2 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.h ('k') | src/compiler/graph-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/control-reducer.cc
diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc
index 23bf92903dd3d8815740ec55639fdc8b20053603..03d0583b23a0aec5649b9a9caef66b2719ee9897 100644
--- a/src/compiler/control-reducer.cc
+++ b/src/compiler/control-reducer.cc
@@ -21,16 +21,17 @@ enum VisitState { kUnvisited, kOnStack, kRevisit, kVisited };
class ControlReducerImpl {
public:
- ControlReducerImpl(JSGraph* jsgraph, CommonOperatorBuilder* common)
- : zone_(jsgraph->zone()->isolate()),
+ ControlReducerImpl(Zone* zone, JSGraph* jsgraph,
+ CommonOperatorBuilder* common)
+ : zone_(zone),
jsgraph_(jsgraph),
common_(common),
- state_(jsgraph->graph()->NodeCount(), kUnvisited, &zone_),
- stack_(&zone_),
- revisit_(&zone_),
+ state_(jsgraph->graph()->NodeCount(), kUnvisited, zone_),
+ stack_(zone_),
+ revisit_(zone_),
dead_(NULL) {}
- Zone zone_;
+ Zone* zone_;
JSGraph* jsgraph_;
CommonOperatorBuilder* common_;
ZoneVector<VisitState> state_;
@@ -40,7 +41,7 @@ class ControlReducerImpl {
void Trim() {
// Mark all nodes reachable from end.
- NodeVector nodes(&zone_);
+ NodeVector nodes(zone_);
state_.assign(jsgraph_->graph()->NodeCount(), kUnvisited);
Push(jsgraph_->graph()->end());
while (!stack_.empty()) {
@@ -104,17 +105,17 @@ class ControlReducerImpl {
}
};
-void ControlReducer::ReduceGraph(JSGraph* jsgraph,
+void ControlReducer::ReduceGraph(Zone* zone, JSGraph* jsgraph,
CommonOperatorBuilder* common) {
- ControlReducerImpl impl(jsgraph, NULL);
+ ControlReducerImpl impl(zone, jsgraph, NULL);
// Only trim the graph for now. Control reduction can reduce non-terminating
// loops to graphs that are unschedulable at the moment.
impl.Trim();
}
-void ControlReducer::TrimGraph(JSGraph* jsgraph) {
- ControlReducerImpl impl(jsgraph, NULL);
+void ControlReducer::TrimGraph(Zone* zone, JSGraph* jsgraph) {
+ ControlReducerImpl impl(zone, jsgraph, NULL);
impl.Trim();
}
}
« no previous file with comments | « src/compiler/control-reducer.h ('k') | src/compiler/graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698