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

Unified Diff: test/unittests/compiler/graph-reducer-unittest.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/tail-call-optimization.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/graph-reducer-unittest.cc
diff --git a/test/unittests/compiler/graph-reducer-unittest.cc b/test/unittests/compiler/graph-reducer-unittest.cc
index 599af72983a53bc0068d9b3a4efebeac40aea24a..8d05c526c3a0b1498442aa41e2ce98393cd788ca 100644
--- a/test/unittests/compiler/graph-reducer-unittest.cc
+++ b/test/unittests/compiler/graph-reducer-unittest.cc
@@ -5,6 +5,7 @@
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/node.h"
+#include "src/compiler/node-properties.h"
#include "src/compiler/operator.h"
#include "test/unittests/compiler/graph-reducer-unittest.h"
#include "test/unittests/test-utils.h"
@@ -63,15 +64,15 @@ class InPlaceABReducer final : public Reducer {
switch (node->op()->opcode()) {
case kOpcodeA0:
EXPECT_EQ(0, node->InputCount());
- node->set_op(&kOpB0);
+ NodeProperties::ChangeOp(node, &kOpB0);
return Replace(node);
case kOpcodeA1:
EXPECT_EQ(1, node->InputCount());
- node->set_op(&kOpB1);
+ NodeProperties::ChangeOp(node, &kOpB1);
return Replace(node);
case kOpcodeA2:
EXPECT_EQ(2, node->InputCount());
- node->set_op(&kOpB2);
+ NodeProperties::ChangeOp(node, &kOpB2);
return Replace(node);
}
return NoChange();
@@ -178,15 +179,15 @@ class InPlaceBCReducer final : public Reducer {
switch (node->op()->opcode()) {
case kOpcodeB0:
EXPECT_EQ(0, node->InputCount());
- node->set_op(&kOpC0);
+ NodeProperties::ChangeOp(node, &kOpC0);
return Replace(node);
case kOpcodeB1:
EXPECT_EQ(1, node->InputCount());
- node->set_op(&kOpC1);
+ NodeProperties::ChangeOp(node, &kOpC1);
return Replace(node);
case kOpcodeB2:
EXPECT_EQ(2, node->InputCount());
- node->set_op(&kOpC2);
+ NodeProperties::ChangeOp(node, &kOpC2);
return Replace(node);
}
return NoChange();
« no previous file with comments | « src/compiler/tail-call-optimization.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698