| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 V(GlobalObject) \ | 99 V(GlobalObject) \ |
| 100 V(GlobalReceiver) \ | 100 V(GlobalReceiver) \ |
| 101 V(Goto) \ | 101 V(Goto) \ |
| 102 V(HasCachedArrayIndex) \ | 102 V(HasCachedArrayIndex) \ |
| 103 V(HasCachedArrayIndexAndBranch) \ | 103 V(HasCachedArrayIndexAndBranch) \ |
| 104 V(HasInstanceType) \ | 104 V(HasInstanceType) \ |
| 105 V(HasInstanceTypeAndBranch) \ | 105 V(HasInstanceTypeAndBranch) \ |
| 106 V(InstanceOf) \ | 106 V(InstanceOf) \ |
| 107 V(InstanceOfAndBranch) \ | 107 V(InstanceOfAndBranch) \ |
| 108 V(InstanceOfKnownGlobal) \ | 108 V(InstanceOfKnownGlobal) \ |
| 109 V(Integer32ToClamped) \ |
| 109 V(Integer32ToDouble) \ | 110 V(Integer32ToDouble) \ |
| 110 V(InvokeFunction) \ | 111 V(InvokeFunction) \ |
| 111 V(IsNull) \ | 112 V(IsNull) \ |
| 112 V(IsNullAndBranch) \ | 113 V(IsNullAndBranch) \ |
| 113 V(IsObject) \ | 114 V(IsObject) \ |
| 114 V(IsObjectAndBranch) \ | 115 V(IsObjectAndBranch) \ |
| 115 V(IsSmi) \ | 116 V(IsSmi) \ |
| 116 V(IsSmiAndBranch) \ | 117 V(IsSmiAndBranch) \ |
| 117 V(IsConstructCall) \ | 118 V(IsConstructCall) \ |
| 118 V(IsConstructCallAndBranch) \ | 119 V(IsConstructCallAndBranch) \ |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { | 1583 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { |
| 1583 public: | 1584 public: |
| 1584 explicit LInteger32ToDouble(LOperand* value) { | 1585 explicit LInteger32ToDouble(LOperand* value) { |
| 1585 inputs_[0] = value; | 1586 inputs_[0] = value; |
| 1586 } | 1587 } |
| 1587 | 1588 |
| 1588 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") | 1589 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") |
| 1589 }; | 1590 }; |
| 1590 | 1591 |
| 1591 | 1592 |
| 1593 class LInteger32ToClamped: public LTemplateInstruction<1, 1, 0> { |
| 1594 public: |
| 1595 explicit LInteger32ToClamped(LOperand* value) { |
| 1596 inputs_[0] = value; |
| 1597 } |
| 1598 |
| 1599 DECLARE_CONCRETE_INSTRUCTION(Integer32ToClamped, "int32-to-clamped-int-8") |
| 1600 }; |
| 1601 |
| 1602 |
| 1592 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { | 1603 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { |
| 1593 public: | 1604 public: |
| 1594 explicit LNumberTagI(LOperand* value) { | 1605 explicit LNumberTagI(LOperand* value) { |
| 1595 inputs_[0] = value; | 1606 inputs_[0] = value; |
| 1596 } | 1607 } |
| 1597 | 1608 |
| 1598 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") | 1609 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") |
| 1599 }; | 1610 }; |
| 1600 | 1611 |
| 1601 | 1612 |
| 1602 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { | 1613 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { |
| 1603 public: | 1614 public: |
| 1604 LNumberTagD(LOperand* value, LOperand* temp) { | 1615 LNumberTagD(LOperand* value, LOperand* temp) { |
| 1605 inputs_[0] = value; | 1616 inputs_[0] = value; |
| 1606 temps_[0] = temp; | 1617 temps_[0] = temp; |
| 1607 } | 1618 } |
| 1608 | 1619 |
| 1609 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 1620 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
| 1610 }; | 1621 }; |
| 1611 | 1622 |
| 1612 | 1623 |
| 1613 // Sometimes truncating conversion from a tagged value to an int32. | 1624 // Sometimes truncating conversion from a tagged value to an int32. |
| 1614 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { | 1625 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { |
| 1615 public: | 1626 public: |
| 1616 LDoubleToI(LOperand* value, LOperand* temp) { | 1627 LDoubleToI(LOperand* value, LOperand* temp, ToIRoundingMode mode) |
| 1628 : rounding_mode_(mode) { |
| 1617 inputs_[0] = value; | 1629 inputs_[0] = value; |
| 1618 temps_[0] = temp; | 1630 temps_[0] = temp; |
| 1619 } | 1631 } |
| 1620 | 1632 |
| 1621 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") | 1633 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") |
| 1622 DECLARE_HYDROGEN_ACCESSOR(Change) | 1634 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 1623 | 1635 |
| 1624 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 1636 ToIRoundingMode rounding_mode() const { return rounding_mode_; } |
| 1637 |
| 1638 private: |
| 1639 ToIRoundingMode rounding_mode_; |
| 1625 }; | 1640 }; |
| 1626 | 1641 |
| 1627 | 1642 |
| 1628 // Truncating conversion from a tagged value to an int32. | 1643 // Truncating conversion from a tagged value to an int32. |
| 1629 class LTaggedToI: public LTemplateInstruction<1, 1, 1> { | 1644 class LTaggedToI: public LTemplateInstruction<1, 1, 1> { |
| 1630 public: | 1645 public: |
| 1631 LTaggedToI(LOperand* value, LOperand* temp) { | 1646 LTaggedToI(LOperand* value, LOperand* temp, ToIRoundingMode mode) |
| 1647 : rounding_mode_(mode) { |
| 1632 inputs_[0] = value; | 1648 inputs_[0] = value; |
| 1633 temps_[0] = temp; | 1649 temps_[0] = temp; |
| 1634 } | 1650 } |
| 1635 | 1651 |
| 1636 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 1652 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
| 1637 DECLARE_HYDROGEN_ACCESSOR(Change) | 1653 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 1638 | 1654 |
| 1639 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 1655 bool rounding_mode() const { return rounding_mode_; } |
| 1656 |
| 1657 private: |
| 1658 ToIRoundingMode rounding_mode_; |
| 1640 }; | 1659 }; |
| 1641 | 1660 |
| 1642 | 1661 |
| 1643 class LSmiTag: public LTemplateInstruction<1, 1, 0> { | 1662 class LSmiTag: public LTemplateInstruction<1, 1, 0> { |
| 1644 public: | 1663 public: |
| 1645 explicit LSmiTag(LOperand* value) { | 1664 explicit LSmiTag(LOperand* value) { |
| 1646 inputs_[0] = value; | 1665 inputs_[0] = value; |
| 1647 } | 1666 } |
| 1648 | 1667 |
| 1649 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") | 1668 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") |
| 1650 }; | 1669 }; |
| 1651 | 1670 |
| 1652 | 1671 |
| 1653 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { | 1672 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { |
| 1654 public: | 1673 public: |
| 1655 explicit LNumberUntagD(LOperand* value) { | 1674 explicit LNumberUntagD(LOperand* value) { |
| 1656 inputs_[0] = value; | 1675 inputs_[0] = value; |
| 1657 } | 1676 } |
| 1658 | 1677 |
| 1659 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") | 1678 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") |
| 1660 }; | 1679 }; |
| 1661 | 1680 |
| 1662 | 1681 |
| 1663 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { | 1682 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { |
| 1664 public: | 1683 public: |
| 1665 LSmiUntag(LOperand* value, bool needs_check) | 1684 LSmiUntag(LOperand* value, bool needs_check, bool should_clamp) |
| 1666 : needs_check_(needs_check) { | 1685 : needs_check_(needs_check), |
| 1686 should_clamp_(should_clamp) { |
| 1667 inputs_[0] = value; | 1687 inputs_[0] = value; |
| 1668 } | 1688 } |
| 1669 | 1689 |
| 1670 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") | 1690 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") |
| 1671 | 1691 |
| 1672 bool needs_check() const { return needs_check_; } | 1692 bool needs_check() const { return needs_check_; } |
| 1693 bool should_clamp() const { return should_clamp_; } |
| 1673 | 1694 |
| 1674 private: | 1695 private: |
| 1675 bool needs_check_; | 1696 bool needs_check_; |
| 1697 bool should_clamp_; |
| 1676 }; | 1698 }; |
| 1677 | 1699 |
| 1678 | 1700 |
| 1679 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { | 1701 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { |
| 1680 public: | 1702 public: |
| 1681 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) { | 1703 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) { |
| 1682 inputs_[0] = obj; | 1704 inputs_[0] = obj; |
| 1683 inputs_[1] = val; | 1705 inputs_[1] = val; |
| 1684 temps_[0] = temp; | 1706 temps_[0] = temp; |
| 1685 } | 1707 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1734 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) | 1756 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) |
| 1735 | 1757 |
| 1736 virtual void PrintDataTo(StringStream* stream); | 1758 virtual void PrintDataTo(StringStream* stream); |
| 1737 | 1759 |
| 1738 LOperand* object() { return inputs_[0]; } | 1760 LOperand* object() { return inputs_[0]; } |
| 1739 LOperand* key() { return inputs_[1]; } | 1761 LOperand* key() { return inputs_[1]; } |
| 1740 LOperand* value() { return inputs_[2]; } | 1762 LOperand* value() { return inputs_[2]; } |
| 1741 }; | 1763 }; |
| 1742 | 1764 |
| 1743 | 1765 |
| 1744 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 1> { | 1766 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> { |
| 1745 public: | 1767 public: |
| 1746 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, | 1768 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, |
| 1747 LOperand* key, | 1769 LOperand* key, |
| 1748 LOperand* val, | 1770 LOperand* val) { |
| 1749 LOperand* temp) { | |
| 1750 inputs_[0] = external_pointer; | 1771 inputs_[0] = external_pointer; |
| 1751 inputs_[1] = key; | 1772 inputs_[1] = key; |
| 1752 inputs_[2] = val; | 1773 inputs_[2] = val; |
| 1753 temps_[0] = temp; | |
| 1754 } | 1774 } |
| 1755 | 1775 |
| 1756 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, | 1776 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, |
| 1757 "store-keyed-specialized-array-element") | 1777 "store-keyed-specialized-array-element") |
| 1758 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) | 1778 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) |
| 1759 | 1779 |
| 1760 LOperand* external_pointer() { return inputs_[0]; } | 1780 LOperand* external_pointer() { return inputs_[0]; } |
| 1761 LOperand* key() { return inputs_[1]; } | 1781 LOperand* key() { return inputs_[1]; } |
| 1762 LOperand* value() { return inputs_[2]; } | 1782 LOperand* value() { return inputs_[2]; } |
| 1763 ExternalArrayType array_type() const { | 1783 ExternalArrayType array_type() const { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2287 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2268 }; | 2288 }; |
| 2269 | 2289 |
| 2270 #undef DECLARE_HYDROGEN_ACCESSOR | 2290 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2271 #undef DECLARE_INSTRUCTION | 2291 #undef DECLARE_INSTRUCTION |
| 2272 #undef DECLARE_CONCRETE_INSTRUCTION | 2292 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2273 | 2293 |
| 2274 } } // namespace v8::internal | 2294 } } // namespace v8::internal |
| 2275 | 2295 |
| 2276 #endif // V8_IA32_LITHIUM_IA32_H_ | 2296 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |