Index: test/cctest/compiler/test-node.cc |
diff --git a/test/cctest/compiler/test-node.cc b/test/cctest/compiler/test-node.cc |
index 8ac38274b651e4893a4f8bc27b5f910bf35cc84f..1a6bf7ca129a34cbb72b887584eeda6b87b7d3e0 100644 |
--- a/test/cctest/compiler/test-node.cc |
+++ b/test/cctest/compiler/test-node.cc |
@@ -16,14 +16,8 @@ |
#define NONE reinterpret_cast<Node*>(1) |
-static Operator dummy_operator0(IrOpcode::kParameter, Operator::kNoWrite, |
- "dummy", 0, 0, 0, 1, 0, 0); |
-static Operator dummy_operator1(IrOpcode::kParameter, Operator::kNoWrite, |
- "dummy", 1, 0, 0, 1, 0, 0); |
-static Operator dummy_operator2(IrOpcode::kParameter, Operator::kNoWrite, |
- "dummy", 2, 0, 0, 1, 0, 0); |
-static Operator dummy_operator3(IrOpcode::kParameter, Operator::kNoWrite, |
- "dummy", 3, 0, 0, 1, 0, 0); |
+static Operator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite, |
+ "dummy", 0, 0, 0, 1, 0, 0); |
#define CHECK_USES(node, ...) \ |
do { \ |
@@ -34,12 +28,9 @@ |
} while (false) |
-namespace { |
- |
typedef std::multiset<Node*, std::less<Node*>> NodeMSet; |
- |
-void CheckUseChain(Node* node, Node** uses, int use_count) { |
+static void CheckUseChain(Node* node, Node** uses, int use_count) { |
// Check ownership. |
if (use_count == 1) CHECK(node->OwnedBy(uses[0])); |
if (use_count > 1) { |
@@ -91,7 +82,16 @@ |
} |
-void CheckInputs(Node* node, Node** inputs, int input_count) { |
+#define CHECK_INPUTS(node, ...) \ |
+ do { \ |
+ Node* __array[] = {__VA_ARGS__}; \ |
+ int __size = \ |
+ __array[0] != NONE ? static_cast<int>(arraysize(__array)) : 0; \ |
+ CheckInputs(node, __array, __size); \ |
+ } while (false) |
+ |
+ |
+static void CheckInputs(Node* node, Node** inputs, int input_count) { |
CHECK_EQ(input_count, node->InputCount()); |
// Check InputAt(). |
for (int i = 0; i < static_cast<int>(input_count); i++) { |
@@ -129,25 +129,14 @@ |
} |
} |
-} // namespace |
- |
- |
-#define CHECK_INPUTS(node, ...) \ |
- do { \ |
- Node* __array[] = {__VA_ARGS__}; \ |
- int __size = \ |
- __array[0] != NONE ? static_cast<int>(arraysize(__array)) : 0; \ |
- CheckInputs(node, __array, __size); \ |
- } while (false) |
- |
TEST(NodeUseIteratorReplaceUses) { |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
- Node* n3 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator); |
CHECK_USES(n0, n1, n2); |
@@ -169,8 +158,8 @@ |
TEST(NodeUseIteratorReplaceUsesSelf) { |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
CHECK_USES(n0, n1); |
CHECK_USES(n1, NONE); |
@@ -180,7 +169,7 @@ |
CHECK_USES(n0, NONE); |
CHECK_USES(n1, n1); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
n1->ReplaceUses(n2); |
@@ -193,11 +182,11 @@ |
TEST(ReplaceInput) { |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
- Node* n3 = graph.NewNode(&dummy_operator3, n0, n1, n2); |
- Node* n4 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
+ Node* n3 = graph.NewNode(&dummy_operator, n0, n1, n2); |
+ Node* n4 = graph.NewNode(&dummy_operator); |
CHECK_USES(n0, n3); |
CHECK_USES(n1, n3); |
@@ -221,17 +210,17 @@ |
Graph graph(&zone); |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
CHECK(!n0->OwnedBy(n1)); |
CHECK(!n1->OwnedBy(n0)); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
CHECK(n0->OwnedBy(n2)); |
CHECK(!n2->OwnedBy(n0)); |
- Node* n3 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator, n0); |
CHECK(!n0->OwnedBy(n2)); |
CHECK(!n0->OwnedBy(n3)); |
CHECK(!n2->OwnedBy(n0)); |
@@ -239,11 +228,11 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
CHECK(n0->OwnedBy(n1)); |
CHECK(!n1->OwnedBy(n0)); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
CHECK(!n0->OwnedBy(n1)); |
CHECK(!n0->OwnedBy(n2)); |
CHECK(!n1->OwnedBy(n0)); |
@@ -251,7 +240,7 @@ |
CHECK(!n2->OwnedBy(n0)); |
CHECK(!n2->OwnedBy(n1)); |
- Node* n3 = graph.NewNode(&dummy_operator0); |
+ Node* n3 = graph.NewNode(&dummy_operator); |
n2->ReplaceInput(0, n3); |
CHECK(n0->OwnedBy(n1)); |
@@ -270,18 +259,18 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
CHECK_USES(n0, n1); |
CHECK_USES(n1, NONE); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
CHECK_USES(n0, n1, n2); |
CHECK_USES(n2, NONE); |
- Node* n3 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator, n0); |
CHECK_USES(n0, n1, n2, n3); |
CHECK_USES(n3, NONE); |
@@ -292,14 +281,14 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
- Node* n3 = graph.NewNode(&dummy_operator3, n0, n1, n2); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator, n0, n1, n2); |
CHECK_INPUTS(n3, n0, n1, n2); |
- Node* n4 = graph.NewNode(&dummy_operator3, n0, n1, n2); |
+ Node* n4 = graph.NewNode(&dummy_operator, n0, n1, n2); |
n3->AppendInput(graph.zone(), n4); |
CHECK_INPUTS(n3, n0, n1, n2, n4); |
@@ -310,7 +299,7 @@ |
CHECK_INPUTS(n3, n0, n1, n2, n4, n4); |
CHECK_USES(n4, n3, n3); |
- Node* n5 = graph.NewNode(&dummy_operator1, n4); |
+ Node* n5 = graph.NewNode(&dummy_operator, n4); |
CHECK_USES(n4, n3, n3, n5); |
} |
@@ -320,9 +309,9 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n1); |
CHECK_INPUTS(n0, NONE); |
CHECK_INPUTS(n1, n0); |
@@ -350,16 +339,16 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n1); |
CHECK_INPUTS(n0, NONE); |
CHECK_INPUTS(n1, n0); |
CHECK_INPUTS(n2, n0, n1); |
CHECK_USES(n0, n1, n2); |
- Node* n3 = graph.NewNode(&dummy_operator0); |
+ Node* n3 = graph.NewNode(&dummy_operator); |
n2->AppendInput(graph.zone(), n3); |
@@ -372,9 +361,9 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n1); |
CHECK_INPUTS(n0, NONE); |
CHECK_INPUTS(n1, n0); |
@@ -399,10 +388,10 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
- Node* n3 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator, n0); |
n3->AppendInput(graph.zone(), n1); |
n3->AppendInput(graph.zone(), n2); |
@@ -422,10 +411,10 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
- Node* n3 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator); |
CHECK_INPUTS(n2, n0); |
@@ -450,14 +439,14 @@ |
Zone zone; |
Graph graph(&zone); |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
n2->ReplaceInput(0, n1); |
CHECK_EQ(0, n0->UseCount()); |
CHECK_EQ(1, n1->UseCount()); |
- Node* n3 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n3 = graph.NewNode(&dummy_operator, n0); |
n3->ReplaceInput(0, n1); |
CHECK_EQ(0, n0->UseCount()); |
CHECK_EQ(2, n1->UseCount()); |
@@ -469,25 +458,25 @@ |
Graph graph(&zone); |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
n1->TrimInputCount(1); |
CHECK_INPUTS(n1, n0); |
CHECK_USES(n0, n1); |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
n1->TrimInputCount(0); |
CHECK_INPUTS(n1, NONE); |
CHECK_USES(n0, NONE); |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n1); |
n2->TrimInputCount(2); |
CHECK_INPUTS(n2, n0, n1); |
CHECK_USES(n0, n2); |
@@ -495,9 +484,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n1); |
n2->TrimInputCount(1); |
CHECK_INPUTS(n2, n0); |
CHECK_USES(n0, n2); |
@@ -505,9 +494,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n1); |
n2->TrimInputCount(0); |
CHECK_INPUTS(n2, NONE); |
CHECK_USES(n0, NONE); |
@@ -515,16 +504,16 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n0); |
n2->TrimInputCount(1); |
CHECK_INPUTS(n2, n0); |
CHECK_USES(n0, n2); |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator2, n0, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0, n0); |
n2->TrimInputCount(0); |
CHECK_INPUTS(n2, NONE); |
CHECK_USES(n0, NONE); |
@@ -537,8 +526,8 @@ |
Graph graph(&zone); |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
n1->AppendInput(graph.zone(), n0); |
CHECK_INPUTS(n1, n0); |
CHECK_USES(n0, n1); |
@@ -549,8 +538,8 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
n1->AppendInput(graph.zone(), n0); |
CHECK_EQ(1, n1->InputCount()); |
n1->TrimInputCount(0); |
@@ -559,9 +548,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
n2->AppendInput(graph.zone(), n0); |
n2->AppendInput(graph.zone(), n1); |
CHECK_INPUTS(n2, n0, n1); |
@@ -573,9 +562,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
n2->AppendInput(graph.zone(), n0); |
n2->AppendInput(graph.zone(), n1); |
CHECK_INPUTS(n2, n0, n1); |
@@ -587,9 +576,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
n2->AppendInput(graph.zone(), n0); |
n2->AppendInput(graph.zone(), n1); |
CHECK_INPUTS(n2, n0, n1); |
@@ -601,8 +590,8 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
n2->AppendInput(graph.zone(), n0); |
n2->AppendInput(graph.zone(), n0); |
CHECK_INPUTS(n2, n0, n0); |
@@ -613,8 +602,8 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator); |
n2->AppendInput(graph.zone(), n0); |
n2->AppendInput(graph.zone(), n0); |
CHECK_INPUTS(n2, n0, n0); |
@@ -631,9 +620,9 @@ |
Graph graph(&zone); |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
n2->AppendInput(graph.zone(), n1); |
CHECK_INPUTS(n2, n0, n1); |
n2->TrimInputCount(2); |
@@ -644,9 +633,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
n2->AppendInput(graph.zone(), n1); |
CHECK_INPUTS(n2, n0, n1); |
n2->TrimInputCount(1); |
@@ -657,9 +646,9 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
n2->AppendInput(graph.zone(), n1); |
CHECK_INPUTS(n2, n0, n1); |
n2->TrimInputCount(0); |
@@ -670,8 +659,8 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
n2->AppendInput(graph.zone(), n0); |
CHECK_INPUTS(n2, n0, n0); |
CHECK_USES(n0, n2, n2); |
@@ -682,8 +671,8 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n2 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n2 = graph.NewNode(&dummy_operator, n0); |
n2->AppendInput(graph.zone(), n0); |
CHECK_EQ(2, n2->InputCount()); |
CHECK_EQ(2, n0->UseCount()); |
@@ -700,14 +689,14 @@ |
Graph graph(&zone); |
for (int i = 0; i < 2; i++) { |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
Node* n2; |
if (i == 0) { |
- n2 = graph.NewNode(&dummy_operator2, n0, n1); |
+ n2 = graph.NewNode(&dummy_operator, n0, n1); |
CHECK_INPUTS(n2, n0, n1); |
} else { |
- n2 = graph.NewNode(&dummy_operator1, n0); |
+ n2 = graph.NewNode(&dummy_operator, n0); |
CHECK_INPUTS(n2, n0); |
n2->AppendInput(graph.zone(), n1); // with out-of-line input. |
CHECK_INPUTS(n2, n0, n1); |
@@ -729,8 +718,8 @@ |
} |
{ |
- Node* n0 = graph.NewNode(&dummy_operator0); |
- Node* n1 = graph.NewNode(&dummy_operator1, n0); |
+ Node* n0 = graph.NewNode(&dummy_operator); |
+ Node* n1 = graph.NewNode(&dummy_operator, n0); |
n1->ReplaceInput(0, n1); // self-reference. |
CHECK_INPUTS(n0, NONE); |
@@ -752,13 +741,13 @@ |
Graph graph(&zone); |
Node* nodes[] = { |
- graph.NewNode(&dummy_operator0), graph.NewNode(&dummy_operator0), |
- graph.NewNode(&dummy_operator0), graph.NewNode(&dummy_operator0), |
- graph.NewNode(&dummy_operator0)}; |
+ graph.NewNode(&dummy_operator), graph.NewNode(&dummy_operator), |
+ graph.NewNode(&dummy_operator), graph.NewNode(&dummy_operator), |
+ graph.NewNode(&dummy_operator)}; |
int max = static_cast<int>(arraysize(nodes)); |
- Node* last = graph.NewNode(&dummy_operator0); |
+ Node* last = graph.NewNode(&dummy_operator); |
for (int i = 0; i < max; i++) { |
last->AppendInput(graph.zone(), nodes[i]); |