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

Side by Side Diff: test/compiler-unittests/graph-unittest.h

Issue 480863002: Refactor ChangeLowering class to avoid template specialization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_UNITTESTS_NODE_MATCHERS_H_ 5 #ifndef V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_
6 #define V8_COMPILER_UNITTESTS_NODE_MATCHERS_H_ 6 #define V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_
7 7
8 #include "src/compiler/graph.h"
8 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "test/compiler-unittests/common-operator-unittest.h"
9 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
10 12
11 namespace v8 { 13 namespace v8 {
12 namespace internal { 14 namespace internal {
13 15
14 // Forward declarations. 16 // Forward declarations.
15 class HeapObject; 17 class HeapObject;
16 template <class T> 18 template <class T>
17 class PrintableUnique; 19 class PrintableUnique;
18 20
19 namespace compiler { 21 namespace compiler {
20 22
21 // Forward declarations. 23 class GraphTest : public CommonOperatorTest {
22 class Node; 24 public:
25 explicit GraphTest(int parameters = 1);
26 virtual ~GraphTest();
23 27
24 using testing::Matcher; 28 protected:
29 Graph* graph() { return &graph_; }
30
31 private:
32 Graph graph_;
33 };
34
35
36 using ::testing::Matcher;
25 37
26 Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher, 38 Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
27 const Matcher<Node*>& control_matcher); 39 const Matcher<Node*>& control_matcher);
40 Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
41 const Matcher<Node*>& control1_matcher);
42 Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher);
43 Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher);
28 Matcher<Node*> IsHeapConstant( 44 Matcher<Node*> IsHeapConstant(
29 const Matcher<PrintableUnique<HeapObject> >& value_matcher); 45 const Matcher<PrintableUnique<HeapObject> >& value_matcher);
30 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher); 46 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher);
31 Matcher<Node*> IsPhi(const Matcher<Node*>& value0_matcher, 47 Matcher<Node*> IsPhi(const Matcher<Node*>& value0_matcher,
32 const Matcher<Node*>& value1_matcher, 48 const Matcher<Node*>& value1_matcher,
33 const Matcher<Node*>& merge_matcher); 49 const Matcher<Node*>& merge_matcher);
34 Matcher<Node*> IsProjection(const Matcher<int32_t>& index_matcher, 50 Matcher<Node*> IsProjection(const Matcher<int32_t>& index_matcher,
35 const Matcher<Node*>& base_matcher); 51 const Matcher<Node*>& base_matcher);
36 52
37 Matcher<Node*> IsLoad(const Matcher<MachineType>& type_matcher, 53 Matcher<Node*> IsLoad(const Matcher<MachineType>& type_matcher,
(...skipping 25 matching lines...) Expand all
63 const Matcher<Node*>& rhs_matcher); 79 const Matcher<Node*>& rhs_matcher);
64 Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher, 80 Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher,
65 const Matcher<Node*>& rhs_matcher); 81 const Matcher<Node*>& rhs_matcher);
66 Matcher<Node*> IsConvertInt64ToInt32(const Matcher<Node*>& input_matcher); 82 Matcher<Node*> IsConvertInt64ToInt32(const Matcher<Node*>& input_matcher);
67 Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher); 83 Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
68 84
69 } // namespace compiler 85 } // namespace compiler
70 } // namespace internal 86 } // namespace internal
71 } // namespace v8 87 } // namespace v8
72 88
73 #endif // V8_COMPILER_UNITTESTS_NODE_MATCHERS_H_ 89 #endif // V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_
OLDNEW
« no previous file with comments | « test/compiler-unittests/compiler-unittests.gyp ('k') | test/compiler-unittests/graph-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698