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

Unified Diff: src/compiler/control-flow-optimizer.cc

Issue 1366753003: [turbofan] Make Node::set_op safer via wrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 3 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/common-operator-reducer.cc ('k') | src/compiler/dead-code-elimination.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/control-flow-optimizer.cc
diff --git a/src/compiler/control-flow-optimizer.cc b/src/compiler/control-flow-optimizer.cc
index 25e183e1f65b1d66ad4abd630bcec7e2fcbc6159..3fc3bcefaca43f67292ca90827362139117f02e5 100644
--- a/src/compiler/control-flow-optimizer.cc
+++ b/src/compiler/control-flow-optimizer.cc
@@ -245,7 +245,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
branch->NullAllInputs();
if_true->ReplaceInput(0, node);
}
- if_true->set_op(common()->IfValue(value));
+ NodeProperties::ChangeOp(if_true, common()->IfValue(value));
if_false->NullAllInputs();
Enqueue(if_true);
@@ -261,13 +261,13 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
return false;
}
DCHECK_LT(1u, values.size());
- node->set_op(common()->Switch(values.size() + 1));
node->ReplaceInput(0, index);
- if_true->set_op(common()->IfValue(value));
+ NodeProperties::ChangeOp(node, common()->Switch(values.size() + 1));
if_true->ReplaceInput(0, node);
+ NodeProperties::ChangeOp(if_true, common()->IfValue(value));
Enqueue(if_true);
- if_false->set_op(common()->IfDefault());
if_false->ReplaceInput(0, node);
+ NodeProperties::ChangeOp(if_false, common()->IfDefault());
Enqueue(if_false);
branch->NullAllInputs();
return true;
« no previous file with comments | « src/compiler/common-operator-reducer.cc ('k') | src/compiler/dead-code-elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698