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/type-hints.h" | 9 #include "src/compiler/simplified-operator.h" |
10 #include "src/machine-type.h" | 10 #include "src/machine-type.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 // Forward declarations. | 16 // Forward declarations. |
17 class ExternalReference; | 17 class ExternalReference; |
18 template <typename T> | 18 template <typename T> |
19 class Handle; | 19 class Handle; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, | 205 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, |
206 const Matcher<Node*>& lhs_matcher, | 206 const Matcher<Node*>& lhs_matcher, |
207 const Matcher<Node*>& rhs_matcher); | 207 const Matcher<Node*>& rhs_matcher); |
208 Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher, | 208 Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher, |
209 const Matcher<Node*>& rhs_matcher); | 209 const Matcher<Node*>& rhs_matcher); |
210 Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher, | 210 Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher, |
211 const Matcher<Node*>& rhs_matcher); | 211 const Matcher<Node*>& rhs_matcher); |
212 Matcher<Node*> IsNumberAdd(const Matcher<Node*>& lhs_matcher, | 212 Matcher<Node*> IsNumberAdd(const Matcher<Node*>& lhs_matcher, |
213 const Matcher<Node*>& rhs_matcher); | 213 const Matcher<Node*>& rhs_matcher); |
214 | 214 |
215 #define DECLARE_SPECULATIVE_BINOP_MATCHER(opcode) \ | 215 #define DECLARE_SPECULATIVE_BINOP_MATCHER(opcode) \ |
216 Matcher<Node*> Is##opcode( \ | 216 Matcher<Node*> Is##opcode(const Matcher<NumberOperationHint>& hint_matcher, \ |
217 const Matcher<BinaryOperationHints::Hint>& hint_matcher, \ | 217 const Matcher<Node*>& lhs_matcher, \ |
218 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, \ | 218 const Matcher<Node*>& rhs_matcher, \ |
219 const Matcher<Node*>& effect_matcher, \ | 219 const Matcher<Node*>& effect_matcher, \ |
220 const Matcher<Node*>& control_matcher); | 220 const Matcher<Node*>& control_matcher); |
221 SPECULATIVE_BINOPS(DECLARE_SPECULATIVE_BINOP_MATCHER); | 221 SPECULATIVE_BINOPS(DECLARE_SPECULATIVE_BINOP_MATCHER); |
222 #undef DECLARE_SPECULATIVE_BINOP_MATCHER | 222 #undef DECLARE_SPECULATIVE_BINOP_MATCHER |
223 | 223 |
224 Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher, | 224 Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher, |
225 const Matcher<Node*>& rhs_matcher); | 225 const Matcher<Node*>& rhs_matcher); |
226 Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher, | 226 Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher, |
227 const Matcher<Node*>& rhs_matcher); | 227 const Matcher<Node*>& rhs_matcher); |
228 Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher, | 228 Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher, |
229 const Matcher<Node*>& rhs_matcher); | 229 const Matcher<Node*>& rhs_matcher); |
230 Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher, | 230 Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 const Matcher<Node*>& rhs_matcher); | 455 const Matcher<Node*>& rhs_matcher); |
456 Matcher<Node*> IsWord32ReverseBytes(const Matcher<Node*>& value_matcher); | 456 Matcher<Node*> IsWord32ReverseBytes(const Matcher<Node*>& value_matcher); |
457 | 457 |
458 Matcher<Node*> IsStackSlot(); | 458 Matcher<Node*> IsStackSlot(); |
459 | 459 |
460 } // namespace compiler | 460 } // namespace compiler |
461 } // namespace internal | 461 } // namespace internal |
462 } // namespace v8 | 462 } // namespace v8 |
463 | 463 |
464 #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ | 464 #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |
OLD | NEW |