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

Unified Diff: src/compiler/osr.cc

Issue 1366753003: [turbofan] Make Node::set_op safer via wrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Expand to other reducers. 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
Index: src/compiler/osr.cc
diff --git a/src/compiler/osr.cc b/src/compiler/osr.cc
index 43e139d25033bdeeff2ac511257f1c7044e39b12..4389e90065f255d66b218f5d14486b154720233a 100644
--- a/src/compiler/osr.cc
+++ b/src/compiler/osr.cc
@@ -237,7 +237,7 @@ static void PeelOuterLoopsForOsr(Graph* graph, CommonOperatorBuilder* common,
NodeId const id = end->InputAt(i)->id();
for (NodeVector* const copy : copies) {
end->AppendInput(graph->zone(), copy->at(id));
- end->set_op(common->End(end->InputCount()));
+ NodeProperties::ChangeOp(end, common->End(end->InputCount()));
}
}
@@ -301,11 +301,13 @@ void OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
CHECK_NE(0, live_input_count);
for (Node* const use : osr_loop->uses()) {
if (NodeProperties::IsPhi(use)) {
- use->set_op(common->ResizeMergeOrPhi(use->op(), live_input_count));
+ NodeProperties::ChangeOp(
+ use, common->ResizeMergeOrPhi(use->op(), live_input_count));
use->RemoveInput(0);
}
}
- osr_loop->set_op(common->ResizeMergeOrPhi(osr_loop->op(), live_input_count));
+ NodeProperties::ChangeOp(
+ osr_loop, common->ResizeMergeOrPhi(osr_loop->op(), live_input_count));
osr_loop->RemoveInput(0);
// Run control reduction and graph trimming.

Powered by Google App Engine
This is Rietveld 408576698