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

Unified Diff: src/compiler/diamond.h

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/diamond.h
diff --git a/src/compiler/diamond.h b/src/compiler/diamond.h
index cf83638bba8ddd6f6c501668d892c5d593cfc375..08b22024d6a82b752967e3b1f47954f7b19dd90d 100644
--- a/src/compiler/diamond.h
+++ b/src/compiler/diamond.h
@@ -8,6 +8,7 @@
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/node.h"
+#include "src/compiler/node-properties.h"
namespace v8 {
namespace internal {
@@ -60,7 +61,7 @@ struct Diamond {
void OverwriteWithPhi(Node* node, MachineType machine_type, Node* tv,
Node* fv) {
DCHECK(node->InputCount() >= 3);
- node->set_op(common->Phi(machine_type, 2));
+ NodeProperties::ChangeOp(node, common->Phi(machine_type, 2));
Jarin 2015/09/24 14:00:41 Should not this go after trimming? (Same below.)
Michael Starzinger 2015/09/24 14:21:28 Done. Dead code is being dead, gotta love it. :/
node->ReplaceInput(0, tv);
node->ReplaceInput(1, fv);
node->ReplaceInput(2, merge);
@@ -69,7 +70,7 @@ struct Diamond {
void OverwriteWithEffectPhi(Node* node, Node* te, Node* fe) {
DCHECK(node->InputCount() >= 3);
- node->set_op(common->EffectPhi(2));
+ NodeProperties::ChangeOp(node, common->EffectPhi(2));
node->ReplaceInput(0, te);
node->ReplaceInput(1, fe);
node->ReplaceInput(2, merge);

Powered by Google App Engine
This is Rietveld 408576698