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 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 std::vector<Matcher<Node*>> value_matchers; | 1723 std::vector<Matcher<Node*>> value_matchers; |
1724 value_matchers.push_back(value0_matcher); | 1724 value_matchers.push_back(value0_matcher); |
1725 value_matchers.push_back(value1_matcher); | 1725 value_matchers.push_back(value1_matcher); |
1726 value_matchers.push_back(value2_matcher); | 1726 value_matchers.push_back(value2_matcher); |
1727 value_matchers.push_back(value3_matcher); | 1727 value_matchers.push_back(value3_matcher); |
1728 return MakeMatcher(new IsTailCallMatcher(descriptor_matcher, value_matchers, | 1728 return MakeMatcher(new IsTailCallMatcher(descriptor_matcher, value_matchers, |
1729 effect_matcher, control_matcher)); | 1729 effect_matcher, control_matcher)); |
1730 } | 1730 } |
1731 | 1731 |
1732 | 1732 |
| 1733 Matcher<Node*> IsTailCall( |
| 1734 const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 1735 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 1736 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 1737 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& effect_matcher, |
| 1738 const Matcher<Node*>& control_matcher) { |
| 1739 std::vector<Matcher<Node*>> value_matchers; |
| 1740 value_matchers.push_back(value0_matcher); |
| 1741 value_matchers.push_back(value1_matcher); |
| 1742 value_matchers.push_back(value2_matcher); |
| 1743 value_matchers.push_back(value3_matcher); |
| 1744 value_matchers.push_back(value4_matcher); |
| 1745 return MakeMatcher(new IsTailCallMatcher(descriptor_matcher, value_matchers, |
| 1746 effect_matcher, control_matcher)); |
| 1747 } |
| 1748 |
| 1749 |
| 1750 Matcher<Node*> IsTailCall( |
| 1751 const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 1752 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 1753 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 1754 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher, |
| 1755 const Matcher<Node*>& effect_matcher, |
| 1756 const Matcher<Node*>& control_matcher) { |
| 1757 std::vector<Matcher<Node*>> value_matchers; |
| 1758 value_matchers.push_back(value0_matcher); |
| 1759 value_matchers.push_back(value1_matcher); |
| 1760 value_matchers.push_back(value2_matcher); |
| 1761 value_matchers.push_back(value3_matcher); |
| 1762 value_matchers.push_back(value4_matcher); |
| 1763 value_matchers.push_back(value5_matcher); |
| 1764 return MakeMatcher(new IsTailCallMatcher(descriptor_matcher, value_matchers, |
| 1765 effect_matcher, control_matcher)); |
| 1766 } |
| 1767 |
| 1768 |
1733 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, | 1769 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, |
1734 const Matcher<Node*>& lhs_matcher, | 1770 const Matcher<Node*>& lhs_matcher, |
1735 const Matcher<Node*>& rhs_matcher) { | 1771 const Matcher<Node*>& rhs_matcher) { |
1736 return MakeMatcher( | 1772 return MakeMatcher( |
1737 new IsReferenceEqualMatcher(type_matcher, lhs_matcher, rhs_matcher)); | 1773 new IsReferenceEqualMatcher(type_matcher, lhs_matcher, rhs_matcher)); |
1738 } | 1774 } |
1739 | 1775 |
1740 | 1776 |
1741 Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher, | 1777 Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher, |
1742 const Matcher<Node*>& effect_matcher, | 1778 const Matcher<Node*>& effect_matcher, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 IS_UNOP_MATCHER(NumberToInt32) | 1968 IS_UNOP_MATCHER(NumberToInt32) |
1933 IS_UNOP_MATCHER(NumberToUint32) | 1969 IS_UNOP_MATCHER(NumberToUint32) |
1934 IS_UNOP_MATCHER(ObjectIsSmi) | 1970 IS_UNOP_MATCHER(ObjectIsSmi) |
1935 IS_UNOP_MATCHER(ObjectIsNonNegativeSmi) | 1971 IS_UNOP_MATCHER(ObjectIsNonNegativeSmi) |
1936 IS_UNOP_MATCHER(Word32Clz) | 1972 IS_UNOP_MATCHER(Word32Clz) |
1937 #undef IS_UNOP_MATCHER | 1973 #undef IS_UNOP_MATCHER |
1938 | 1974 |
1939 } // namespace compiler | 1975 } // namespace compiler |
1940 } // namespace internal | 1976 } // namespace internal |
1941 } // namespace v8 | 1977 } // namespace v8 |
OLD | NEW |