| 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_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |
| 6 #define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ | 6 #define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include "src/compiler/machine-operator.h" | 8 #include "src/compiler/machine-operator.h" |
| 9 #include "src/compiler/machine-type.h" | 9 #include "src/compiler/machine-type.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 // Forward declarations. | 15 // Forward declarations. |
| 16 class ExternalReference; | 16 class ExternalReference; |
| 17 class HeapObject; | 17 class HeapObject; |
| 18 template <class T> | 18 template <class T> |
| 19 class Unique; | 19 class Unique; |
| 20 | 20 |
| 21 namespace compiler { | 21 namespace compiler { |
| 22 | 22 |
| 23 // Forward declarations. | 23 // Forward declarations. |
| 24 class BufferAccess; |
| 24 class CallDescriptor; | 25 class CallDescriptor; |
| 25 struct ElementAccess; | 26 struct ElementAccess; |
| 26 struct FieldAccess; | 27 struct FieldAccess; |
| 27 class Node; | 28 class Node; |
| 28 | 29 |
| 29 | 30 |
| 30 using ::testing::Matcher; | 31 using ::testing::Matcher; |
| 31 | 32 |
| 32 | 33 |
| 33 Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher, | 34 Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher, | 81 Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher, |
| 81 const Matcher<Node*>& rhs_matcher); | 82 const Matcher<Node*>& rhs_matcher); |
| 82 Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher, | 83 Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher, |
| 83 const Matcher<Node*>& rhs_matcher); | 84 const Matcher<Node*>& rhs_matcher); |
| 84 Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher, | 85 Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher, |
| 85 const Matcher<Node*>& rhs_matcher); | 86 const Matcher<Node*>& rhs_matcher); |
| 86 Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher, | 87 Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher, |
| 87 const Matcher<Node*>& base_matcher, | 88 const Matcher<Node*>& base_matcher, |
| 88 const Matcher<Node*>& effect_matcher, | 89 const Matcher<Node*>& effect_matcher, |
| 89 const Matcher<Node*>& control_matcher); | 90 const Matcher<Node*>& control_matcher); |
| 91 Matcher<Node*> IsLoadBuffer(const Matcher<BufferAccess>& access_matcher, |
| 92 const Matcher<Node*>& buffer_matcher, |
| 93 const Matcher<Node*>& offset_matcher, |
| 94 const Matcher<Node*>& length_matcher, |
| 95 const Matcher<Node*>& effect_matcher, |
| 96 const Matcher<Node*>& control_matcher); |
| 97 Matcher<Node*> IsStoreBuffer(const Matcher<BufferAccess>& access_matcher, |
| 98 const Matcher<Node*>& buffer_matcher, |
| 99 const Matcher<Node*>& offset_matcher, |
| 100 const Matcher<Node*>& length_matcher, |
| 101 const Matcher<Node*>& value_matcher, |
| 102 const Matcher<Node*>& effect_matcher, |
| 103 const Matcher<Node*>& control_matcher); |
| 90 Matcher<Node*> IsLoadElement(const Matcher<ElementAccess>& access_matcher, | 104 Matcher<Node*> IsLoadElement(const Matcher<ElementAccess>& access_matcher, |
| 91 const Matcher<Node*>& base_matcher, | 105 const Matcher<Node*>& base_matcher, |
| 92 const Matcher<Node*>& index_matcher, | 106 const Matcher<Node*>& index_matcher, |
| 93 const Matcher<Node*>& length_matcher, | 107 const Matcher<Node*>& control_matcher, |
| 94 const Matcher<Node*>& effect_matcher); | 108 const Matcher<Node*>& effect_matcher); |
| 95 Matcher<Node*> IsStoreElement(const Matcher<ElementAccess>& access_matcher, | 109 Matcher<Node*> IsStoreElement(const Matcher<ElementAccess>& access_matcher, |
| 96 const Matcher<Node*>& base_matcher, | 110 const Matcher<Node*>& base_matcher, |
| 97 const Matcher<Node*>& index_matcher, | 111 const Matcher<Node*>& index_matcher, |
| 98 const Matcher<Node*>& length_matcher, | |
| 99 const Matcher<Node*>& value_matcher, | 112 const Matcher<Node*>& value_matcher, |
| 100 const Matcher<Node*>& effect_matcher, | 113 const Matcher<Node*>& effect_matcher, |
| 101 const Matcher<Node*>& control_matcher); | 114 const Matcher<Node*>& control_matcher); |
| 102 | 115 |
| 103 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, | 116 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, |
| 104 const Matcher<Node*>& base_matcher, | 117 const Matcher<Node*>& base_matcher, |
| 105 const Matcher<Node*>& index_matcher, | 118 const Matcher<Node*>& index_matcher, |
| 106 const Matcher<Node*>& effect_matcher, | 119 const Matcher<Node*>& effect_matcher, |
| 107 const Matcher<Node*>& control_matcher); | 120 const Matcher<Node*>& control_matcher); |
| 108 Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, | 121 Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 const Matcher<Node*>& effect_matcher, | 181 const Matcher<Node*>& effect_matcher, |
| 169 const Matcher<Node*>& control_matcher); | 182 const Matcher<Node*>& control_matcher); |
| 170 Matcher<Node*> IsNumberToInt32(const Matcher<Node*>& input_matcher); | 183 Matcher<Node*> IsNumberToInt32(const Matcher<Node*>& input_matcher); |
| 171 Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher); | 184 Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher); |
| 172 | 185 |
| 173 } // namespace compiler | 186 } // namespace compiler |
| 174 } // namespace internal | 187 } // namespace internal |
| 175 } // namespace v8 | 188 } // namespace v8 |
| 176 | 189 |
| 177 #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ | 190 #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |
| OLD | NEW |