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 #include "test/unittests/compiler/node-test-utils.h" | 5 #include "test/unittests/compiler/node-test-utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 } | 349 } |
350 *os << ") and effect ("; | 350 *os << ") and effect ("; |
351 effect_matcher_.DescribeTo(os); | 351 effect_matcher_.DescribeTo(os); |
352 *os << ") and control ("; | 352 *os << ") and control ("; |
353 control_matcher_.DescribeTo(os); | 353 control_matcher_.DescribeTo(os); |
354 *os << ")"; | 354 *os << ")"; |
355 } | 355 } |
356 | 356 |
357 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { | 357 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { |
358 return (NodeMatcher::MatchAndExplain(node, listener) && | 358 return (NodeMatcher::MatchAndExplain(node, listener) && |
359 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), | 359 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), |
360 "value", value_matcher_, listener) && | 360 "value", value_matcher_, listener) && |
361 (!has_second_return_value_ || | 361 (!has_second_return_value_ || |
362 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2), | 362 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), |
363 "value2", value2_matcher_, listener)) && | 363 "value2", value2_matcher_, listener)) && |
364 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", | 364 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", |
365 effect_matcher_, listener) && | 365 effect_matcher_, listener) && |
366 PrintMatchAndExplain(NodeProperties::GetControlInput(node), | 366 PrintMatchAndExplain(NodeProperties::GetControlInput(node), |
367 "control", control_matcher_, listener)); | 367 "control", control_matcher_, listener)); |
368 } | 368 } |
369 | 369 |
370 private: | 370 private: |
371 const Matcher<Node*> value_matcher_; | 371 const Matcher<Node*> value_matcher_; |
372 const Matcher<Node*> value2_matcher_; | 372 const Matcher<Node*> value2_matcher_; |
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 IS_UNOP_MATCHER(StringFromCharCode) | 2379 IS_UNOP_MATCHER(StringFromCharCode) |
2380 IS_UNOP_MATCHER(Word32Clz) | 2380 IS_UNOP_MATCHER(Word32Clz) |
2381 IS_UNOP_MATCHER(Word32Ctz) | 2381 IS_UNOP_MATCHER(Word32Ctz) |
2382 IS_UNOP_MATCHER(Word32Popcnt) | 2382 IS_UNOP_MATCHER(Word32Popcnt) |
2383 IS_UNOP_MATCHER(Word32ReverseBytes) | 2383 IS_UNOP_MATCHER(Word32ReverseBytes) |
2384 #undef IS_UNOP_MATCHER | 2384 #undef IS_UNOP_MATCHER |
2385 | 2385 |
2386 } // namespace compiler | 2386 } // namespace compiler |
2387 } // namespace internal | 2387 } // namespace internal |
2388 } // namespace v8 | 2388 } // namespace v8 |
OLD | NEW |