Update V8 to version 4.1.0.21
This is a cherry-pick of all commits up to and including the
4.1.0.21 cherry-pick in Chromium.
Original commit message:
Version 4.1.0.21 (cherry-pick)
Merged 206e9136bde0f2b5ae8cb77afbb1e7833e5bd412
Unlink pages from the space page list after evacuation.
BUG=430201
LOG=N
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/953813002
Cr-Commit-Position: refs/branch-heads/4.1@{#22}
Cr-Branched-From: 2e08d2a7aa9d65d269d8c57aba82eb38a8cb0a18-refs/heads/candidates@{#25353}
---
FPIIM-449
Change-Id: I8c23c7bbb70772b4858fe8a47b64fa97ee0d1f8c
diff --git a/test/unittests/compiler/graph-unittest.h b/test/unittests/compiler/graph-unittest.h
new file mode 100644
index 0000000..7c75161
--- /dev/null
+++ b/test/unittests/compiler/graph-unittest.h
@@ -0,0 +1,81 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
+#define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
+
+#include "src/compiler/common-operator.h"
+#include "src/compiler/graph.h"
+#include "src/compiler/typer.h"
+#include "test/unittests/test-utils.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace v8 {
+namespace internal {
+
+// Forward declarations.
+template <class T>
+class Handle;
+class HeapObject;
+template <class T>
+class Unique;
+
+namespace compiler {
+
+using ::testing::Matcher;
+
+
+class GraphTest : public TestWithContext, public TestWithZone {
+ public:
+ explicit GraphTest(int num_parameters = 1);
+ ~GraphTest() OVERRIDE;
+
+ protected:
+ Node* Parameter(int32_t index = 0);
+ Node* Float32Constant(volatile float value);
+ Node* Float64Constant(volatile double value);
+ Node* Int32Constant(int32_t value);
+ Node* Uint32Constant(uint32_t value) {
+ return Int32Constant(bit_cast<int32_t>(value));
+ }
+ Node* Int64Constant(int64_t value);
+ Node* NumberConstant(volatile double value);
+ Node* HeapConstant(const Handle<HeapObject>& value);
+ Node* HeapConstant(const Unique<HeapObject>& value);
+ Node* FalseConstant();
+ Node* TrueConstant();
+ Node* UndefinedConstant();
+
+ Matcher<Node*> IsFalseConstant();
+ Matcher<Node*> IsTrueConstant();
+
+ CommonOperatorBuilder* common() { return &common_; }
+ Graph* graph() { return &graph_; }
+
+ private:
+ CommonOperatorBuilder common_;
+ Graph graph_;
+};
+
+
+class TypedGraphTest : public GraphTest {
+ public:
+ explicit TypedGraphTest(int num_parameters = 1);
+ ~TypedGraphTest() OVERRIDE;
+
+ protected:
+ Node* Parameter(int32_t index = 0) { return GraphTest::Parameter(index); }
+ Node* Parameter(Type* type, int32_t index = 0);
+
+ Typer* typer() { return &typer_; }
+
+ private:
+ Typer typer_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_