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

Unified Diff: src/compiler/tail-call-optimization.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/simplified-operator-reducer.cc ('k') | test/unittests/compiler/graph-reducer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/tail-call-optimization.cc
diff --git a/src/compiler/tail-call-optimization.cc b/src/compiler/tail-call-optimization.cc
index a88ebe3e63d6f5d220a6958860953ec9b82b869b..6635fb982ba2f0a420397fc20eb05dea25f69f89 100644
--- a/src/compiler/tail-call-optimization.cc
+++ b/src/compiler/tail-call-optimization.cc
@@ -63,8 +63,6 @@ Reduction TailCallOptimization::Reduce(Node* node) {
DCHECK_EQ(call, NodeProperties::GetControlInput(control, 0));
DCHECK_EQ(3, node->InputCount());
- node->set_op(
- common()->TailCall(OpParameter<CallDescriptor const*>(call)));
node->ReplaceInput(0, NodeProperties::GetEffectInput(call));
node->ReplaceInput(1, NodeProperties::GetControlInput(call));
node->RemoveInput(2);
@@ -72,6 +70,8 @@ Reduction TailCallOptimization::Reduce(Node* node) {
node->InsertInput(graph()->zone(), index,
NodeProperties::GetValueInput(call, index));
}
+ NodeProperties::ChangeOp(
+ node, common()->TailCall(OpParameter<CallDescriptor const*>(call)));
return Changed(node);
}
}
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | test/unittests/compiler/graph-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698