OLD | NEW |
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_GRAPH_UNITTEST_H_ | 5 #ifndef V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_ |
6 #define V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_ | 6 #define V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_ |
7 | 7 |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "test/compiler-unittests/common-operator-unittest.h" | 10 #include "test/compiler-unittests/common-operator-unittest.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class GraphTest : public CommonOperatorTest { | 26 class GraphTest : public CommonOperatorTest { |
27 public: | 27 public: |
28 explicit GraphTest(int parameters = 1); | 28 explicit GraphTest(int parameters = 1); |
29 virtual ~GraphTest(); | 29 virtual ~GraphTest(); |
30 | 30 |
31 protected: | 31 protected: |
32 Node* Parameter(int32_t index); | 32 Node* Parameter(int32_t index); |
33 Node* Float64Constant(double value); | 33 Node* Float64Constant(double value); |
34 Node* Int32Constant(int32_t value); | 34 Node* Int32Constant(int32_t value); |
| 35 Node* Int64Constant(int64_t value); |
35 Node* NumberConstant(double value); | 36 Node* NumberConstant(double value); |
36 Node* HeapConstant(const PrintableUnique<HeapObject>& value); | 37 Node* HeapConstant(const PrintableUnique<HeapObject>& value); |
37 Node* FalseConstant(); | 38 Node* FalseConstant(); |
38 Node* TrueConstant(); | 39 Node* TrueConstant(); |
39 | 40 |
40 Matcher<Node*> IsFalseConstant(); | 41 Matcher<Node*> IsFalseConstant(); |
41 Matcher<Node*> IsTrueConstant(); | 42 Matcher<Node*> IsTrueConstant(); |
42 | 43 |
43 Graph* graph() { return &graph_; } | 44 Graph* graph() { return &graph_; } |
44 | 45 |
(...skipping 11 matching lines...) Expand all Loading... |
56 Matcher<Node*> IsControlEffect(const Matcher<Node*>& control_matcher); | 57 Matcher<Node*> IsControlEffect(const Matcher<Node*>& control_matcher); |
57 Matcher<Node*> IsValueEffect(const Matcher<Node*>& value_matcher); | 58 Matcher<Node*> IsValueEffect(const Matcher<Node*>& value_matcher); |
58 Matcher<Node*> IsFinish(const Matcher<Node*>& value_matcher, | 59 Matcher<Node*> IsFinish(const Matcher<Node*>& value_matcher, |
59 const Matcher<Node*>& effect_matcher); | 60 const Matcher<Node*>& effect_matcher); |
60 Matcher<Node*> IsExternalConstant( | 61 Matcher<Node*> IsExternalConstant( |
61 const Matcher<ExternalReference>& value_matcher); | 62 const Matcher<ExternalReference>& value_matcher); |
62 Matcher<Node*> IsHeapConstant( | 63 Matcher<Node*> IsHeapConstant( |
63 const Matcher<PrintableUnique<HeapObject> >& value_matcher); | 64 const Matcher<PrintableUnique<HeapObject> >& value_matcher); |
64 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher); | 65 Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher); |
65 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher); | 66 Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher); |
| 67 Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher); |
66 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher); | 68 Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher); |
67 Matcher<Node*> IsPhi(const Matcher<Node*>& value0_matcher, | 69 Matcher<Node*> IsPhi(const Matcher<Node*>& value0_matcher, |
68 const Matcher<Node*>& value1_matcher, | 70 const Matcher<Node*>& value1_matcher, |
69 const Matcher<Node*>& merge_matcher); | 71 const Matcher<Node*>& merge_matcher); |
70 Matcher<Node*> IsProjection(const Matcher<int32_t>& index_matcher, | 72 Matcher<Node*> IsProjection(const Matcher<int32_t>& index_matcher, |
71 const Matcher<Node*>& base_matcher); | 73 const Matcher<Node*>& base_matcher); |
72 Matcher<Node*> IsCall(const Matcher<CallDescriptor*>& descriptor_matcher, | 74 Matcher<Node*> IsCall(const Matcher<CallDescriptor*>& descriptor_matcher, |
73 const Matcher<Node*>& value0_matcher, | 75 const Matcher<Node*>& value0_matcher, |
74 const Matcher<Node*>& value1_matcher, | 76 const Matcher<Node*>& value1_matcher, |
75 const Matcher<Node*>& value2_matcher, | 77 const Matcher<Node*>& value2_matcher, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); | 118 Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); |
117 Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); | 119 Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); |
118 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); | 120 Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); |
119 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); | 121 Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); |
120 | 122 |
121 } // namespace compiler | 123 } // namespace compiler |
122 } // namespace internal | 124 } // namespace internal |
123 } // namespace v8 | 125 } // namespace v8 |
124 | 126 |
125 #endif // V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_ | 127 #endif // V8_COMPILER_UNITTESTS_GRAPH_UNITTEST_H_ |
OLD | NEW |