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 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 | 1574 |
1575 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") | 1575 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") |
1576 | 1576 |
1577 bool needs_check() const { return needs_check_; } | 1577 bool needs_check() const { return needs_check_; } |
1578 | 1578 |
1579 private: | 1579 private: |
1580 bool needs_check_; | 1580 bool needs_check_; |
1581 }; | 1581 }; |
1582 | 1582 |
1583 | 1583 |
1584 class LStoreNamed: public LTemplateInstruction<0, 2, 1> { | 1584 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { |
1585 public: | 1585 public: |
1586 LStoreNamed(LOperand* obj, LOperand* val) { | 1586 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) { |
1587 inputs_[0] = obj; | 1587 inputs_[0] = obj; |
1588 inputs_[1] = val; | 1588 inputs_[1] = val; |
1589 } | |
1590 | |
1591 DECLARE_INSTRUCTION(StoreNamed) | |
1592 DECLARE_HYDROGEN_ACCESSOR(StoreNamed) | |
1593 | |
1594 virtual void PrintDataTo(StringStream* stream); | |
1595 | |
1596 LOperand* object() { return inputs_[0]; } | |
1597 LOperand* value() { return inputs_[1]; } | |
1598 Handle<Object> name() const { return hydrogen()->name(); } | |
1599 }; | |
1600 | |
1601 | |
1602 class LStoreNamedField: public LStoreNamed { | |
1603 public: | |
1604 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) | |
1605 : LStoreNamed(obj, val) { | |
1606 temps_[0] = temp; | 1589 temps_[0] = temp; |
1607 } | 1590 } |
1608 | 1591 |
1609 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 1592 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") |
1610 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | 1593 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |
1611 | 1594 |
| 1595 virtual void PrintDataTo(StringStream* stream); |
| 1596 |
| 1597 LOperand* object() { return inputs_[0]; } |
| 1598 LOperand* value() { return inputs_[1]; } |
| 1599 |
| 1600 Handle<Object> name() const { return hydrogen()->name(); } |
1612 bool is_in_object() { return hydrogen()->is_in_object(); } | 1601 bool is_in_object() { return hydrogen()->is_in_object(); } |
1613 int offset() { return hydrogen()->offset(); } | 1602 int offset() { return hydrogen()->offset(); } |
1614 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } | 1603 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } |
1615 Handle<Map> transition() const { return hydrogen()->transition(); } | 1604 Handle<Map> transition() const { return hydrogen()->transition(); } |
1616 }; | 1605 }; |
1617 | 1606 |
1618 | 1607 |
1619 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { | 1608 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { |
1620 public: | 1609 public: |
1621 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { | 1610 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
1622 inputs_[0] = context; | 1611 inputs_[0] = context; |
1623 inputs_[1] = object; | 1612 inputs_[1] = object; |
1624 inputs_[2] = value; | 1613 inputs_[2] = value; |
1625 } | 1614 } |
1626 | 1615 |
1627 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 1616 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
1628 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 1617 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
1629 | 1618 |
| 1619 virtual void PrintDataTo(StringStream* stream); |
| 1620 |
1630 LOperand* context() { return inputs_[0]; } | 1621 LOperand* context() { return inputs_[0]; } |
1631 LOperand* object() { return inputs_[1]; } | 1622 LOperand* object() { return inputs_[1]; } |
1632 LOperand* value() { return inputs_[2]; } | 1623 LOperand* value() { return inputs_[2]; } |
1633 Handle<Object> name() const { return hydrogen()->name(); } | 1624 Handle<Object> name() const { return hydrogen()->name(); } |
1634 }; | 1625 }; |
1635 | 1626 |
1636 | 1627 |
1637 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { | 1628 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { |
1638 public: | 1629 public: |
1639 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { | 1630 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { |
1640 inputs_[0] = obj; | 1631 inputs_[0] = obj; |
1641 inputs_[1] = key; | 1632 inputs_[1] = key; |
1642 inputs_[2] = val; | 1633 inputs_[2] = val; |
1643 } | 1634 } |
1644 | 1635 |
1645 DECLARE_INSTRUCTION(StoreKeyed) | 1636 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, |
| 1637 "store-keyed-fast-element") |
| 1638 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) |
1646 | 1639 |
1647 virtual void PrintDataTo(StringStream* stream); | 1640 virtual void PrintDataTo(StringStream* stream); |
1648 | 1641 |
1649 LOperand* object() { return inputs_[0]; } | 1642 LOperand* object() { return inputs_[0]; } |
1650 LOperand* key() { return inputs_[1]; } | 1643 LOperand* key() { return inputs_[1]; } |
1651 LOperand* value() { return inputs_[2]; } | 1644 LOperand* value() { return inputs_[2]; } |
1652 }; | 1645 }; |
1653 | 1646 |
1654 | 1647 |
1655 class LStoreKeyedFastElement: public LStoreKeyed { | |
1656 public: | |
1657 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) | |
1658 : LStoreKeyed(obj, key, val) {} | |
1659 | |
1660 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, | |
1661 "store-keyed-fast-element") | |
1662 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) | |
1663 }; | |
1664 | |
1665 | |
1666 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 1> { | 1648 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 1> { |
1667 public: | 1649 public: |
1668 LStorePixelArrayElement(LOperand* external_pointer, | 1650 LStorePixelArrayElement(LOperand* external_pointer, |
1669 LOperand* key, | 1651 LOperand* key, |
1670 LOperand* val, | 1652 LOperand* val, |
1671 LOperand* clamped) { | 1653 LOperand* clamped) { |
1672 inputs_[0] = external_pointer; | 1654 inputs_[0] = external_pointer; |
1673 inputs_[1] = key; | 1655 inputs_[1] = key; |
1674 inputs_[2] = val; | 1656 inputs_[2] = val; |
1675 temps_[0] = clamped; | 1657 temps_[0] = clamped; |
(...skipping 16 matching lines...) Expand all Loading... |
1692 LOperand* key, | 1674 LOperand* key, |
1693 LOperand* value) { | 1675 LOperand* value) { |
1694 inputs_[0] = context; | 1676 inputs_[0] = context; |
1695 inputs_[1] = object; | 1677 inputs_[1] = object; |
1696 inputs_[2] = key; | 1678 inputs_[2] = key; |
1697 inputs_[3] = value; | 1679 inputs_[3] = value; |
1698 } | 1680 } |
1699 | 1681 |
1700 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 1682 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
1701 | 1683 |
| 1684 virtual void PrintDataTo(StringStream* stream); |
| 1685 |
1702 LOperand* context() { return inputs_[0]; } | 1686 LOperand* context() { return inputs_[0]; } |
1703 LOperand* object() { return inputs_[1]; } | 1687 LOperand* object() { return inputs_[1]; } |
1704 LOperand* key() { return inputs_[2]; } | 1688 LOperand* key() { return inputs_[2]; } |
1705 LOperand* value() { return inputs_[3]; } | 1689 LOperand* value() { return inputs_[3]; } |
1706 }; | 1690 }; |
1707 | 1691 |
1708 | 1692 |
1709 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { | 1693 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { |
1710 public: | 1694 public: |
1711 LStringCharCodeAt(LOperand* string, LOperand* index) { | 1695 LStringCharCodeAt(LOperand* string, LOperand* index) { |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2136 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2120 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2137 }; | 2121 }; |
2138 | 2122 |
2139 #undef DECLARE_HYDROGEN_ACCESSOR | 2123 #undef DECLARE_HYDROGEN_ACCESSOR |
2140 #undef DECLARE_INSTRUCTION | 2124 #undef DECLARE_INSTRUCTION |
2141 #undef DECLARE_CONCRETE_INSTRUCTION | 2125 #undef DECLARE_CONCRETE_INSTRUCTION |
2142 | 2126 |
2143 } } // namespace v8::internal | 2127 } } // namespace v8::internal |
2144 | 2128 |
2145 #endif // V8_IA32_LITHIUM_IA32_H_ | 2129 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |