Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/test/unittests/compiler/value-numbering-reducer-unittest.cc b/test/unittests/compiler/value-numbering-reducer-unittest.cc
index b6be0bf..c003033 100644
--- a/test/unittests/compiler/value-numbering-reducer-unittest.cc
+++ b/test/unittests/compiler/value-numbering-reducer-unittest.cc
@@ -5,6 +5,8 @@
#include <limits>
#include "src/compiler/graph.h"
+#include "src/compiler/node.h"
+#include "src/compiler/operator.h"
#include "src/compiler/value-numbering-reducer.h"
#include "test/unittests/test-utils.h"
@@ -20,8 +22,8 @@
};
-static const TestOperator kOp0(0, Operator::kEliminatable, 0, 1);
-static const TestOperator kOp1(1, Operator::kEliminatable, 1, 1);
+static const TestOperator kOp0(0, Operator::kIdempotent, 0, 1);
+static const TestOperator kOp1(1, Operator::kIdempotent, 1, 1);
class ValueNumberingReducerTest : public TestWithZone {
@@ -42,8 +44,8 @@
TEST_F(ValueNumberingReducerTest, AllInputsAreChecked) {
Node* na = graph()->NewNode(&kOp0);
Node* nb = graph()->NewNode(&kOp0);
- Node* n1 = graph()->NewNode(&kOp0, na);
- Node* n2 = graph()->NewNode(&kOp0, nb);
+ Node* n1 = graph()->NewNode(&kOp1, na);
+ Node* n2 = graph()->NewNode(&kOp1, nb);
EXPECT_FALSE(Reduce(n1).Changed());
EXPECT_FALSE(Reduce(n2).Changed());
}
@@ -71,20 +73,19 @@
static const size_t kMaxInputCount = 16;
Node* inputs[kMaxInputCount];
for (size_t i = 0; i < arraysize(inputs); ++i) {
- Operator::Opcode opcode = static_cast<Operator::Opcode>(
- std::numeric_limits<Operator::Opcode>::max() - i);
+ Operator::Opcode opcode = static_cast<Operator::Opcode>(kMaxInputCount + i);
inputs[i] = graph()->NewNode(
- new (zone()) TestOperator(opcode, Operator::kEliminatable, 0, 1));
+ new (zone()) TestOperator(opcode, Operator::kIdempotent, 0, 1));
}
TRACED_FORRANGE(size_t, input_count, 0, arraysize(inputs)) {
const TestOperator op1(static_cast<Operator::Opcode>(input_count),
- Operator::kEliminatable, input_count, 1);
+ Operator::kIdempotent, input_count, 1);
Node* n1 = graph()->NewNode(&op1, static_cast<int>(input_count), inputs);
Reduction r1 = Reduce(n1);
EXPECT_FALSE(r1.Changed());
const TestOperator op2(static_cast<Operator::Opcode>(input_count),
- Operator::kEliminatable, input_count, 1);
+ Operator::kIdempotent, input_count, 1);
Node* n2 = graph()->NewNode(&op2, static_cast<int>(input_count), inputs);
Reduction r2 = Reduce(n2);
EXPECT_TRUE(r2.Changed());
@@ -97,13 +98,12 @@
static const size_t kMaxInputCount = 16;
Node* inputs[kMaxInputCount];
for (size_t i = 0; i < arraysize(inputs); ++i) {
- Operator::Opcode opcode = static_cast<Operator::Opcode>(
- std::numeric_limits<Operator::Opcode>::max() - i);
+ Operator::Opcode opcode = static_cast<Operator::Opcode>(2 + i);
inputs[i] = graph()->NewNode(
- new (zone()) TestOperator(opcode, Operator::kEliminatable, 0, 1));
+ new (zone()) TestOperator(opcode, Operator::kIdempotent, 0, 1));
}
TRACED_FORRANGE(size_t, input_count, 0, arraysize(inputs)) {
- const TestOperator op1(1, Operator::kEliminatable, input_count, 1);
+ const TestOperator op1(1, Operator::kIdempotent, input_count, 1);
Node* n = graph()->NewNode(&op1, static_cast<int>(input_count), inputs);
Reduction r = Reduce(n);
EXPECT_FALSE(r.Changed());