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

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

Issue 929123002: Move DeadControl into the JSGraph so that it can be reused. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-graph.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 9d74b8a6a4fb001f26f581b55c80019631cd0cd4..7f97254b372bf0c4c9a16fbddefd9a0938ca7acd 100644
--- a/src/compiler/control-reducer.cc
+++ b/src/compiler/control-reducer.cc
@@ -54,8 +54,7 @@ class ControlReducerImpl {
common_(common),
state_(jsgraph->graph()->NodeCount(), kUnvisited, zone_),
stack_(zone_),
- revisit_(zone_),
- dead_(NULL) {}
+ revisit_(zone_) {}
Zone* zone_;
JSGraph* jsgraph_;
@@ -63,7 +62,6 @@ class ControlReducerImpl {
ZoneVector<VisitState> state_;
ZoneDeque<Node*> stack_;
ZoneDeque<Node*> revisit_;
- Node* dead_;
void Reduce() {
Push(graph()->end());
@@ -380,10 +378,7 @@ class ControlReducerImpl {
state_[id] = kVisited;
}
- Node* dead() {
- if (dead_ == NULL) dead_ = graph()->NewNode(common_->Dead());
- return dead_;
- }
+ Node* dead() { return jsgraph_->DeadControl(); }
//===========================================================================
// Reducer implementation: perform reductions on a node.
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698