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

Unified Diff: test/unittests/compiler/node-test-utils.h

Issue 639293006: [turbofan] Move node matchers to separate file. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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: test/unittests/compiler/node-test-utils.h
diff --git a/test/unittests/compiler/graph-unittest.h b/test/unittests/compiler/node-test-utils.h
similarity index 82%
copy from test/unittests/compiler/graph-unittest.h
copy to test/unittests/compiler/node-test-utils.h
index 979e26d916706c01fc1d20813f633a4c2c5dc2c1..c5c61dfc0268c5eca37cba5079688a1558b117c7 100644
--- a/test/unittests/compiler/graph-unittest.h
+++ b/test/unittests/compiler/node-test-utils.h
@@ -2,22 +2,18 @@
// 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_
+#ifndef V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
+#define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
-#include "src/compiler/common-operator.h"
-#include "src/compiler/graph.h"
#include "src/compiler/machine-operator.h"
-#include "src/compiler/typer.h"
-#include "test/unittests/test-utils.h"
+#include "src/compiler/machine-type.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace v8 {
namespace internal {
// Forward declarations.
-template <class T>
-class Handle;
+class ExternalReference;
class HeapObject;
template <class T>
class Unique;
@@ -25,60 +21,15 @@ class Unique;
namespace compiler {
// Forward declarations.
+class CallDescriptor;
struct ElementAccess;
struct FieldAccess;
+class Node;
using ::testing::Matcher;
-class GraphTest : public TestWithContext, public TestWithZone {
- public:
- explicit GraphTest(int parameters = 1);
- virtual ~GraphTest();
-
- protected:
- Node* Parameter(int32_t index);
- 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 parameters = 1)
- : GraphTest(parameters),
- typer_(graph(), MaybeHandle<Context>()) {}
-
- protected:
- Typer* typer() { return &typer_; }
-
- private:
- Typer typer_;
-};
-
-
Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
const Matcher<Node*>& control_matcher);
Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
@@ -190,8 +141,8 @@ Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher);
-} // namespace compiler
-} // namespace internal
-} // namespace v8
+} // namespace compiler
+} // namespace internal
+} // namespace v8
-#endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
+#endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
« no previous file with comments | « test/unittests/compiler/machine-operator-reducer-unittest.cc ('k') | test/unittests/compiler/node-test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698