Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: test/unittests/compiler/node-test-utils.cc

Issue 1448913002: [Interpreter] Add support for keyed load / store ICs and named store IC to (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@graph_builder_load
Patch Set: Made the binding of return value of the store explicit. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 } 1466 }
1467 1467
1468 private: 1468 private:
1469 const Matcher<Node*> object_value_matcher_; 1469 const Matcher<Node*> object_value_matcher_;
1470 const Matcher<Node*> key_matcher_; 1470 const Matcher<Node*> key_matcher_;
1471 const Matcher<Node*> effect_matcher_; 1471 const Matcher<Node*> effect_matcher_;
1472 const Matcher<Node*> control_matcher_; 1472 const Matcher<Node*> control_matcher_;
1473 }; 1473 };
1474 1474
1475 1475
1476 // TODO(mythria): Check if we can use the same matcher for Load and Store 1476 class IsJSLoadGlobalMatcher final : public NodeMatcher {
1477 public:
1478 IsJSLoadGlobalMatcher(const Matcher<Handle<Name>>& name_matcher,
1479 const Matcher<TypeofMode> typeof_mode_matcher,
1480 const Matcher<Node*>& feedback_vector_matcher,
1481 const Matcher<Node*>& effect_matcher,
1482 const Matcher<Node*>& control_matcher)
1483 : NodeMatcher(IrOpcode::kJSLoadGlobal),
1484 name_matcher_(name_matcher),
1485 typeof_mode_matcher_(typeof_mode_matcher),
1486 feedback_vector_matcher_(feedback_vector_matcher),
1487 effect_matcher_(effect_matcher),
1488 control_matcher_(control_matcher) {}
1489
1490 void DescribeTo(std::ostream* os) const final {
1491 NodeMatcher::DescribeTo(os);
1492 *os << " whose name (";
1493 name_matcher_.DescribeTo(os);
1494 *os << "), typeof mode (";
1495 typeof_mode_matcher_.DescribeTo(os);
1496 *os << "), feedback vector (";
1497 feedback_vector_matcher_.DescribeTo(os);
1498 *os << "), effect (";
1499 effect_matcher_.DescribeTo(os);
1500 *os << "), and control (";
1501 control_matcher_.DescribeTo(os);
1502 *os << ")";
1503 }
1504
1505 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
1506 return (NodeMatcher::MatchAndExplain(node, listener) &&
1507 PrintMatchAndExplain(OpParameter<LoadGlobalParameters>(node).name(),
1508 "name", name_matcher_, listener) &&
1509 PrintMatchAndExplain(
1510 OpParameter<LoadGlobalParameters>(node).typeof_mode(),
1511 "typeof mode", typeof_mode_matcher_, listener) &&
1512 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
1513 "feedback vector", feedback_vector_matcher_,
1514 listener) &&
1515 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
1516 effect_matcher_, listener) &&
1517 PrintMatchAndExplain(NodeProperties::GetControlInput(node),
1518 "control", control_matcher_, listener));
1519 }
1520
1521 private:
1522 const Matcher<Handle<Name>> name_matcher_;
1523 const Matcher<TypeofMode> typeof_mode_matcher_;
1524 const Matcher<Node*> feedback_vector_matcher_;
1525 const Matcher<Node*> effect_matcher_;
1526 const Matcher<Node*> control_matcher_;
1527 };
1528
1529
1530 class IsJSStoreGlobalMatcher final : public NodeMatcher {
1531 public:
1532 IsJSStoreGlobalMatcher(const Matcher<Handle<Name>>& name_matcher,
1533 const Matcher<Node*>& value_matcher,
1534 const Matcher<Node*>& feedback_vector_matcher,
1535 const Matcher<Node*>& effect_matcher,
1536 const Matcher<Node*>& control_matcher)
1537 : NodeMatcher(IrOpcode::kJSStoreGlobal),
1538 name_matcher_(name_matcher),
1539 value_matcher_(value_matcher),
1540 feedback_vector_matcher_(feedback_vector_matcher),
1541 effect_matcher_(effect_matcher),
1542 control_matcher_(control_matcher) {}
1543
1544 void DescribeTo(std::ostream* os) const final {
1545 NodeMatcher::DescribeTo(os);
1546 *os << " whose name (";
1547 name_matcher_.DescribeTo(os);
1548 *os << "), value (";
1549 value_matcher_.DescribeTo(os);
1550 *os << "), feedback vector (";
1551 feedback_vector_matcher_.DescribeTo(os);
1552 *os << "), effect (";
1553 effect_matcher_.DescribeTo(os);
1554 *os << "), and control (";
1555 control_matcher_.DescribeTo(os);
1556 *os << ")";
1557 }
1558
1559 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
1560 return (
1561 NodeMatcher::MatchAndExplain(node, listener) &&
1562 PrintMatchAndExplain(OpParameter<StoreGlobalParameters>(node).name(),
1563 "name", name_matcher_, listener) &&
1564 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), "value",
1565 value_matcher_, listener) &&
1566 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1),
1567 "feedback vector", feedback_vector_matcher_,
1568 listener) &&
1569 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
1570 effect_matcher_, listener) &&
1571 PrintMatchAndExplain(NodeProperties::GetControlInput(node), "control",
1572 control_matcher_, listener));
1573 }
1574
1575 private:
1576 const Matcher<Handle<Name>> name_matcher_;
1577 const Matcher<Node*> value_matcher_;
1578 const Matcher<Node*> feedback_vector_matcher_;
1579 const Matcher<Node*> effect_matcher_;
1580 const Matcher<Node*> control_matcher_;
1581 };
1582
1583
1477 class IsJSLoadNamedMatcher final : public NodeMatcher { 1584 class IsJSLoadNamedMatcher final : public NodeMatcher {
1478 public: 1585 public:
1479 IsJSLoadNamedMatcher(const Matcher<Handle<Name>>& name_matcher, 1586 IsJSLoadNamedMatcher(const Matcher<Handle<Name>>& name_matcher,
1480 const Matcher<Node*>& object_value_matcher, 1587 const Matcher<Node*>& object_value_matcher,
1481 const Matcher<Node*>& feedback_vector_matcher, 1588 const Matcher<Node*>& feedback_vector_matcher,
1482 const Matcher<Node*>& effect_matcher, 1589 const Matcher<Node*>& effect_matcher,
1483 const Matcher<Node*>& control_matcher) 1590 const Matcher<Node*>& control_matcher)
1484 : NodeMatcher(IrOpcode::kJSLoadNamed), 1591 : NodeMatcher(IrOpcode::kJSLoadNamed),
1485 name_matcher_(name_matcher), 1592 name_matcher_(name_matcher),
1486 object_value_matcher_(object_value_matcher), 1593 object_value_matcher_(object_value_matcher),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 1627
1521 private: 1628 private:
1522 const Matcher<Handle<Name>> name_matcher_; 1629 const Matcher<Handle<Name>> name_matcher_;
1523 const Matcher<Node*> object_value_matcher_; 1630 const Matcher<Node*> object_value_matcher_;
1524 const Matcher<Node*> feedback_vector_matcher_; 1631 const Matcher<Node*> feedback_vector_matcher_;
1525 const Matcher<Node*> effect_matcher_; 1632 const Matcher<Node*> effect_matcher_;
1526 const Matcher<Node*> control_matcher_; 1633 const Matcher<Node*> control_matcher_;
1527 }; 1634 };
1528 1635
1529 1636
1530 class IsJSLoadGlobalMatcher final : public NodeMatcher { 1637 class IsJSLoadPropertyMatcher final : public NodeMatcher {
1531 public: 1638 public:
1532 IsJSLoadGlobalMatcher(const Matcher<Handle<Name>>& name_matcher, 1639 IsJSLoadPropertyMatcher(const Matcher<Node*>& object_matcher,
1533 const Matcher<TypeofMode> typeof_mode_matcher, 1640 const Matcher<Node*>& key_matcher,
1534 const Matcher<Node*>& feedback_vector_matcher, 1641 const Matcher<Node*>& feedback_vector_matcher,
1535 const Matcher<Node*>& effect_matcher, 1642 const Matcher<Node*>& effect_matcher,
1536 const Matcher<Node*>& control_matcher) 1643 const Matcher<Node*>& control_matcher)
1537 : NodeMatcher(IrOpcode::kJSLoadGlobal), 1644 : NodeMatcher(IrOpcode::kJSLoadProperty),
1538 name_matcher_(name_matcher), 1645 object_matcher_(object_matcher),
1539 typeof_mode_matcher_(typeof_mode_matcher), 1646 key_matcher_(key_matcher),
1540 feedback_vector_matcher_(feedback_vector_matcher), 1647 feedback_vector_matcher_(feedback_vector_matcher),
1541 effect_matcher_(effect_matcher), 1648 effect_matcher_(effect_matcher),
1542 control_matcher_(control_matcher) {} 1649 control_matcher_(control_matcher) {}
1543 1650
1544 void DescribeTo(std::ostream* os) const final { 1651 void DescribeTo(std::ostream* os) const final {
1545 NodeMatcher::DescribeTo(os); 1652 NodeMatcher::DescribeTo(os);
1546 *os << " whose name ("; 1653 *os << " whose object (";
1547 name_matcher_.DescribeTo(os); 1654 object_matcher_.DescribeTo(os);
1548 *os << "), typeof mode ("; 1655 *os << "), key (";
1549 typeof_mode_matcher_.DescribeTo(os); 1656 key_matcher_.DescribeTo(os);
1550 *os << "), feedback vector ("; 1657 *os << "), feedback vector (";
1551 feedback_vector_matcher_.DescribeTo(os); 1658 feedback_vector_matcher_.DescribeTo(os);
1552 *os << "), effect ("; 1659 *os << "), effect (";
1660 effect_matcher_.DescribeTo(os);
1661 *os << "), and control (";
1662 control_matcher_.DescribeTo(os);
1663 *os << ")";
1664 }
1665
1666 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
1667 return (NodeMatcher::MatchAndExplain(node, listener) &&
1668 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
1669 "object", object_matcher_, listener) &&
1670 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), "key",
1671 key_matcher_, listener) &&
1672 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2),
1673 "feedback vector", feedback_vector_matcher_,
1674 listener) &&
1675 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
1676 effect_matcher_, listener) &&
1677 PrintMatchAndExplain(NodeProperties::GetControlInput(node),
1678 "control", control_matcher_, listener));
1679 }
1680
1681 private:
1682 const Matcher<Node*> object_matcher_;
1683 const Matcher<Node*> key_matcher_;
1684 const Matcher<Node*> feedback_vector_matcher_;
1685 const Matcher<Node*> effect_matcher_;
1686 const Matcher<Node*> control_matcher_;
1687 };
1688
1689
1690 class IsJSStoreNamedMatcher final : public NodeMatcher {
1691 public:
1692 IsJSStoreNamedMatcher(const Matcher<Handle<Name>>& name_matcher,
1693 const Matcher<Node*>& object_matcher,
1694 const Matcher<Node*>& value_matcher,
1695 const Matcher<Node*>& feedback_vector_matcher,
1696 const Matcher<Node*>& effect_matcher,
1697 const Matcher<Node*>& control_matcher)
1698 : NodeMatcher(IrOpcode::kJSStoreNamed),
1699 name_matcher_(name_matcher),
1700 object_matcher_(object_matcher),
1701 value_matcher_(value_matcher),
1702 feedback_vector_matcher_(feedback_vector_matcher),
1703 effect_matcher_(effect_matcher),
1704 control_matcher_(control_matcher) {}
1705
1706 void DescribeTo(std::ostream* os) const final {
1707 NodeMatcher::DescribeTo(os);
1708 *os << " whose object (";
1709 object_matcher_.DescribeTo(os);
1710 *os << "), name (";
1711 name_matcher_.DescribeTo(os);
1712 *os << "), value (";
1713 value_matcher_.DescribeTo(os);
1714 *os << "), feedback vector (";
1715 feedback_vector_matcher_.DescribeTo(os);
1716 *os << "), effect (";
1553 effect_matcher_.DescribeTo(os); 1717 effect_matcher_.DescribeTo(os);
1554 *os << "), and control ("; 1718 *os << "), and control (";
1555 control_matcher_.DescribeTo(os); 1719 control_matcher_.DescribeTo(os);
1556 *os << ")"; 1720 *os << ")";
1557 } 1721 }
1558 1722
1559 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { 1723 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
1560 return (NodeMatcher::MatchAndExplain(node, listener) && 1724 return (NodeMatcher::MatchAndExplain(node, listener) &&
1561 PrintMatchAndExplain(OpParameter<LoadGlobalParameters>(node).name(), 1725 PrintMatchAndExplain(OpParameter<NamedAccess>(node).name(), "Name",
1562 "name", name_matcher_, listener) && 1726 name_matcher_, listener) &&
1563 PrintMatchAndExplain(
1564 OpParameter<LoadGlobalParameters>(node).typeof_mode(),
1565 "typeof mode", typeof_mode_matcher_, listener) &&
1566 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), 1727 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
1728 "object", object_matcher_, listener) &&
1729 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1),
1730 "value", value_matcher_, listener) &&
1731 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2),
1567 "feedback vector", feedback_vector_matcher_, 1732 "feedback vector", feedback_vector_matcher_,
1568 listener) && 1733 listener) &&
1569 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", 1734 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
1570 effect_matcher_, listener) && 1735 effect_matcher_, listener) &&
1571 PrintMatchAndExplain(NodeProperties::GetControlInput(node), 1736 PrintMatchAndExplain(NodeProperties::GetControlInput(node),
1572 "control", control_matcher_, listener)); 1737 "control", control_matcher_, listener));
1573 } 1738 }
1574 1739
1575 private: 1740 private:
1576 const Matcher<Handle<Name>> name_matcher_; 1741 const Matcher<Handle<Name>> name_matcher_;
1577 const Matcher<TypeofMode> typeof_mode_matcher_; 1742 const Matcher<Node*> object_matcher_;
1743 const Matcher<Node*> value_matcher_;
1578 const Matcher<Node*> feedback_vector_matcher_; 1744 const Matcher<Node*> feedback_vector_matcher_;
1579 const Matcher<Node*> effect_matcher_; 1745 const Matcher<Node*> effect_matcher_;
1580 const Matcher<Node*> control_matcher_; 1746 const Matcher<Node*> control_matcher_;
1581 }; 1747 };
1582 1748
1583 1749
1584 class IsJSStoreGlobalMatcher final : public NodeMatcher { 1750 class IsJSStorePropertyMatcher final : public NodeMatcher {
1585 public: 1751 public:
1586 IsJSStoreGlobalMatcher(const Matcher<Handle<Name>>& name_matcher, 1752 IsJSStorePropertyMatcher(const Matcher<Node*>& object_matcher,
1587 const Matcher<Node*>& value_matcher, 1753 const Matcher<Node*>& key_matcher,
1588 const Matcher<Node*>& feedback_vector_matcher, 1754 const Matcher<Node*>& value_matcher,
1589 const Matcher<Node*>& effect_matcher, 1755 const Matcher<Node*>& feedback_vector_matcher,
1590 const Matcher<Node*>& control_matcher) 1756 const Matcher<Node*>& effect_matcher,
1591 : NodeMatcher(IrOpcode::kJSStoreGlobal), 1757 const Matcher<Node*>& control_matcher)
1592 name_matcher_(name_matcher), 1758 : NodeMatcher(IrOpcode::kJSStoreProperty),
1759 object_matcher_(object_matcher),
1760 key_matcher_(key_matcher),
1593 value_matcher_(value_matcher), 1761 value_matcher_(value_matcher),
1594 feedback_vector_matcher_(feedback_vector_matcher), 1762 feedback_vector_matcher_(feedback_vector_matcher),
1595 effect_matcher_(effect_matcher), 1763 effect_matcher_(effect_matcher),
1596 control_matcher_(control_matcher) {} 1764 control_matcher_(control_matcher) {}
1597 1765
1598 void DescribeTo(std::ostream* os) const final { 1766 void DescribeTo(std::ostream* os) const final {
1599 NodeMatcher::DescribeTo(os); 1767 NodeMatcher::DescribeTo(os);
1600 *os << " whose name ("; 1768 *os << " whose object (";
1601 name_matcher_.DescribeTo(os); 1769 object_matcher_.DescribeTo(os);
1770 *os << "), key (";
1771 key_matcher_.DescribeTo(os);
1602 *os << "), value ("; 1772 *os << "), value (";
1603 value_matcher_.DescribeTo(os); 1773 value_matcher_.DescribeTo(os);
1604 *os << "), feedback vector ("; 1774 *os << "), feedback vector (";
1605 feedback_vector_matcher_.DescribeTo(os); 1775 feedback_vector_matcher_.DescribeTo(os);
1606 *os << "), effect ("; 1776 *os << "), effect (";
1607 effect_matcher_.DescribeTo(os); 1777 effect_matcher_.DescribeTo(os);
1608 *os << "), and control ("; 1778 *os << "), and control (";
1609 control_matcher_.DescribeTo(os);
1610 *os << ")";
1611 } 1779 }
1612 1780
1613 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { 1781 bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
1614 return ( 1782 return (NodeMatcher::MatchAndExplain(node, listener) &&
1615 NodeMatcher::MatchAndExplain(node, listener) && 1783 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
1616 PrintMatchAndExplain(OpParameter<StoreGlobalParameters>(node).name(), 1784 "object", object_matcher_, listener) &&
1617 "name", name_matcher_, listener) && 1785 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), "key",
1618 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), "value", 1786 key_matcher_, listener) &&
1619 value_matcher_, listener) && 1787 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2),
1620 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), 1788 "value", value_matcher_, listener) &&
1621 "feedback vector", feedback_vector_matcher_, 1789 PrintMatchAndExplain(NodeProperties::GetValueInput(node, 3),
1622 listener) && 1790 "feedback vector", feedback_vector_matcher_,
1623 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", 1791 listener) &&
1624 effect_matcher_, listener) && 1792 PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
1625 PrintMatchAndExplain(NodeProperties::GetControlInput(node), "control", 1793 effect_matcher_, listener) &&
1626 control_matcher_, listener)); 1794 PrintMatchAndExplain(NodeProperties::GetControlInput(node),
1795 "control", control_matcher_, listener));
1627 } 1796 }
1628 1797
1629 private: 1798 private:
1630 const Matcher<Handle<Name>> name_matcher_; 1799 const Matcher<Node*> object_matcher_;
1800 const Matcher<Node*> key_matcher_;
1631 const Matcher<Node*> value_matcher_; 1801 const Matcher<Node*> value_matcher_;
1632 const Matcher<Node*> feedback_vector_matcher_; 1802 const Matcher<Node*> feedback_vector_matcher_;
1633 const Matcher<Node*> effect_matcher_; 1803 const Matcher<Node*> effect_matcher_;
1634 const Matcher<Node*> control_matcher_; 1804 const Matcher<Node*> control_matcher_;
1635 }; 1805 };
1636 1806
1637 1807
1638 class IsJSCallFunctionMatcher final : public NodeMatcher { 1808 class IsJSCallFunctionMatcher final : public NodeMatcher {
1639 public: 1809 public:
1640 IsJSCallFunctionMatcher(const std::vector<Matcher<Node*>>& value_matchers, 1810 IsJSCallFunctionMatcher(const std::vector<Matcher<Node*>>& value_matchers,
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 2473
2304 2474
2305 Matcher<Node*> IsJSCallFunction(std::vector<Matcher<Node*>> value_matchers, 2475 Matcher<Node*> IsJSCallFunction(std::vector<Matcher<Node*>> value_matchers,
2306 const Matcher<Node*>& effect_matcher, 2476 const Matcher<Node*>& effect_matcher,
2307 const Matcher<Node*>& control_matcher) { 2477 const Matcher<Node*>& control_matcher) {
2308 return MakeMatcher(new IsJSCallFunctionMatcher(value_matchers, effect_matcher, 2478 return MakeMatcher(new IsJSCallFunctionMatcher(value_matchers, effect_matcher,
2309 control_matcher)); 2479 control_matcher));
2310 } 2480 }
2311 2481
2312 2482
2483 Matcher<Node*> IsJSLoadProperty(const Matcher<Node*>& object_matcher,
2484 const Matcher<Node*>& key_matcher,
2485 const Matcher<Node*>& feedback_vector_matcher,
2486 const Matcher<Node*>& effect_matcher,
2487 const Matcher<Node*>& control_matcher) {
2488 return MakeMatcher(new IsJSLoadPropertyMatcher(
2489 object_matcher, key_matcher, feedback_vector_matcher, effect_matcher,
2490 control_matcher));
2491 }
2492
2493
2494 Matcher<Node*> IsJSStoreNamed(const Handle<Name> name,
2495 const Matcher<Node*>& object_matcher,
2496 const Matcher<Node*>& value_matcher,
2497 const Matcher<Node*>& feedback_vector_matcher,
2498 const Matcher<Node*>& effect_matcher,
2499 const Matcher<Node*>& control_matcher) {
2500 return MakeMatcher(new IsJSStoreNamedMatcher(
2501 _, object_matcher, value_matcher, feedback_vector_matcher, effect_matcher,
2502 control_matcher));
2503 }
2504
2505
2506 Matcher<Node*> IsJSStoreProperty(const Matcher<Node*>& object_matcher,
2507 const Matcher<Node*>& key_matcher,
2508 const Matcher<Node*>& value_matcher,
2509 const Matcher<Node*>& feedback_vector_matcher,
2510 const Matcher<Node*>& effect_matcher,
2511 const Matcher<Node*>& control_matcher) {
2512 return MakeMatcher(new IsJSStorePropertyMatcher(
2513 object_matcher, key_matcher, value_matcher, feedback_vector_matcher,
2514 effect_matcher, control_matcher));
2515 }
2516
2313 #define IS_BINOP_MATCHER(Name) \ 2517 #define IS_BINOP_MATCHER(Name) \
2314 Matcher<Node*> Is##Name(const Matcher<Node*>& lhs_matcher, \ 2518 Matcher<Node*> Is##Name(const Matcher<Node*>& lhs_matcher, \
2315 const Matcher<Node*>& rhs_matcher) { \ 2519 const Matcher<Node*>& rhs_matcher) { \
2316 return MakeMatcher( \ 2520 return MakeMatcher( \
2317 new IsBinopMatcher(IrOpcode::k##Name, lhs_matcher, rhs_matcher)); \ 2521 new IsBinopMatcher(IrOpcode::k##Name, lhs_matcher, rhs_matcher)); \
2318 } 2522 }
2319 IS_BINOP_MATCHER(NumberEqual) 2523 IS_BINOP_MATCHER(NumberEqual)
2320 IS_BINOP_MATCHER(NumberLessThan) 2524 IS_BINOP_MATCHER(NumberLessThan)
2321 IS_BINOP_MATCHER(NumberSubtract) 2525 IS_BINOP_MATCHER(NumberSubtract)
2322 IS_BINOP_MATCHER(NumberMultiply) 2526 IS_BINOP_MATCHER(NumberMultiply)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 IS_UNOP_MATCHER(NumberToUint32) 2592 IS_UNOP_MATCHER(NumberToUint32)
2389 IS_UNOP_MATCHER(ObjectIsSmi) 2593 IS_UNOP_MATCHER(ObjectIsSmi)
2390 IS_UNOP_MATCHER(Word32Clz) 2594 IS_UNOP_MATCHER(Word32Clz)
2391 IS_UNOP_MATCHER(JSUnaryNot) 2595 IS_UNOP_MATCHER(JSUnaryNot)
2392 IS_UNOP_MATCHER(JSTypeOf) 2596 IS_UNOP_MATCHER(JSTypeOf)
2393 #undef IS_UNOP_MATCHER 2597 #undef IS_UNOP_MATCHER
2394 2598
2395 } // namespace compiler 2599 } // namespace compiler
2396 } // namespace internal 2600 } // namespace internal
2397 } // namespace v8 2601 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698