| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 V(Return) \ | 151 V(Return) \ |
| 152 V(SeqStringGetChar) \ | 152 V(SeqStringGetChar) \ |
| 153 V(SeqStringSetChar) \ | 153 V(SeqStringSetChar) \ |
| 154 V(ShiftI) \ | 154 V(ShiftI) \ |
| 155 V(SmiTag) \ | 155 V(SmiTag) \ |
| 156 V(SmiUntag) \ | 156 V(SmiUntag) \ |
| 157 V(StackCheck) \ | 157 V(StackCheck) \ |
| 158 V(StoreCodeEntry) \ | 158 V(StoreCodeEntry) \ |
| 159 V(StoreContextSlot) \ | 159 V(StoreContextSlot) \ |
| 160 V(StoreGlobalCell) \ | 160 V(StoreGlobalCell) \ |
| 161 V(StoreGlobalGeneric) \ | |
| 162 V(StoreKeyed) \ | 161 V(StoreKeyed) \ |
| 163 V(StoreKeyedGeneric) \ | 162 V(StoreKeyedGeneric) \ |
| 164 V(StoreNamedField) \ | 163 V(StoreNamedField) \ |
| 165 V(StoreNamedGeneric) \ | 164 V(StoreNamedGeneric) \ |
| 166 V(StringAdd) \ | 165 V(StringAdd) \ |
| 167 V(StringCharCodeAt) \ | 166 V(StringCharCodeAt) \ |
| 168 V(StringCharFromCode) \ | 167 V(StringCharFromCode) \ |
| 169 V(StringCompareAndBranch) \ | 168 V(StringCompareAndBranch) \ |
| 170 V(SubI) \ | 169 V(SubI) \ |
| 171 V(TaggedToI) \ | 170 V(TaggedToI) \ |
| (...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 inputs_[0] = elements; | 1532 inputs_[0] = elements; |
| 1534 inputs_[1] = key; | 1533 inputs_[1] = key; |
| 1535 } | 1534 } |
| 1536 | 1535 |
| 1537 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1536 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| 1538 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1537 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| 1539 | 1538 |
| 1540 bool is_external() const { | 1539 bool is_external() const { |
| 1541 return hydrogen()->is_external(); | 1540 return hydrogen()->is_external(); |
| 1542 } | 1541 } |
| 1542 bool is_fixed_typed_array() const { |
| 1543 return hydrogen()->is_fixed_typed_array(); |
| 1544 } |
| 1545 bool is_typed_elements() const { |
| 1546 return is_external() || is_fixed_typed_array(); |
| 1547 } |
| 1543 LOperand* elements() { return inputs_[0]; } | 1548 LOperand* elements() { return inputs_[0]; } |
| 1544 LOperand* key() { return inputs_[1]; } | 1549 LOperand* key() { return inputs_[1]; } |
| 1545 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1550 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1546 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1551 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
| 1547 ElementsKind elements_kind() const { | 1552 ElementsKind elements_kind() const { |
| 1548 return hydrogen()->elements_kind(); | 1553 return hydrogen()->elements_kind(); |
| 1549 } | 1554 } |
| 1550 }; | 1555 }; |
| 1551 | 1556 |
| 1552 | 1557 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1598 } | 1603 } |
| 1599 | 1604 |
| 1600 LOperand* value() { return inputs_[0]; } | 1605 LOperand* value() { return inputs_[0]; } |
| 1601 LOperand* temp() { return temps_[0]; } | 1606 LOperand* temp() { return temps_[0]; } |
| 1602 | 1607 |
| 1603 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") | 1608 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") |
| 1604 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) | 1609 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) |
| 1605 }; | 1610 }; |
| 1606 | 1611 |
| 1607 | 1612 |
| 1608 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { | |
| 1609 public: | |
| 1610 explicit LStoreGlobalGeneric(LOperand* context, | |
| 1611 LOperand* global_object, | |
| 1612 LOperand* value) { | |
| 1613 inputs_[0] = context; | |
| 1614 inputs_[1] = global_object; | |
| 1615 inputs_[2] = value; | |
| 1616 } | |
| 1617 | |
| 1618 LOperand* context() { return inputs_[0]; } | |
| 1619 LOperand* global_object() { return inputs_[1]; } | |
| 1620 LOperand* value() { return inputs_[2]; } | |
| 1621 | |
| 1622 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") | |
| 1623 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) | |
| 1624 | |
| 1625 Handle<Object> name() const { return hydrogen()->name(); } | |
| 1626 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | |
| 1627 }; | |
| 1628 | |
| 1629 | |
| 1630 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1613 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1631 public: | 1614 public: |
| 1632 explicit LLoadContextSlot(LOperand* context) { | 1615 explicit LLoadContextSlot(LOperand* context) { |
| 1633 inputs_[0] = context; | 1616 inputs_[0] = context; |
| 1634 } | 1617 } |
| 1635 | 1618 |
| 1636 LOperand* context() { return inputs_[0]; } | 1619 LOperand* context() { return inputs_[0]; } |
| 1637 | 1620 |
| 1638 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1621 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
| 1639 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1622 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 | 1784 |
| 1802 int arity() const { return hydrogen()->argument_count() - 1; } | 1785 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1803 }; | 1786 }; |
| 1804 | 1787 |
| 1805 | 1788 |
| 1806 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { | 1789 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { |
| 1807 public: | 1790 public: |
| 1808 LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, | 1791 LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, |
| 1809 ZoneList<LOperand*>& operands, | 1792 ZoneList<LOperand*>& operands, |
| 1810 Zone* zone) | 1793 Zone* zone) |
| 1811 : descriptor_(descriptor), | 1794 : inputs_(descriptor->environment_length() + 1, zone) { |
| 1812 inputs_(descriptor->environment_length() + 1, zone) { | |
| 1813 ASSERT(descriptor->environment_length() + 1 == operands.length()); | 1795 ASSERT(descriptor->environment_length() + 1 == operands.length()); |
| 1814 inputs_.AddAll(operands, zone); | 1796 inputs_.AddAll(operands, zone); |
| 1815 } | 1797 } |
| 1816 | 1798 |
| 1817 LOperand* target() const { return inputs_[0]; } | 1799 LOperand* target() const { return inputs_[0]; } |
| 1818 | 1800 |
| 1819 private: | 1801 private: |
| 1820 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1802 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
| 1821 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1803 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
| 1822 | 1804 |
| 1823 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1805 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1824 | 1806 |
| 1825 int arity() const { return hydrogen()->argument_count() - 1; } | 1807 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1826 | 1808 |
| 1827 const CallInterfaceDescriptor* descriptor_; | |
| 1828 ZoneList<LOperand*> inputs_; | 1809 ZoneList<LOperand*> inputs_; |
| 1829 | 1810 |
| 1830 // Iterator support. | 1811 // Iterator support. |
| 1831 virtual int InputCount() V8_FINAL V8_OVERRIDE { return inputs_.length(); } | 1812 virtual int InputCount() V8_FINAL V8_OVERRIDE { return inputs_.length(); } |
| 1832 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } | 1813 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } |
| 1833 | 1814 |
| 1834 virtual int TempCount() V8_FINAL V8_OVERRIDE { return 0; } | 1815 virtual int TempCount() V8_FINAL V8_OVERRIDE { return 0; } |
| 1835 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return NULL; } | 1816 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return NULL; } |
| 1836 }; | 1817 }; |
| 1837 | 1818 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 | 2141 |
| 2161 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { | 2142 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2162 public: | 2143 public: |
| 2163 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2144 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
| 2164 inputs_[0] = object; | 2145 inputs_[0] = object; |
| 2165 inputs_[1] = key; | 2146 inputs_[1] = key; |
| 2166 inputs_[2] = value; | 2147 inputs_[2] = value; |
| 2167 } | 2148 } |
| 2168 | 2149 |
| 2169 bool is_external() const { return hydrogen()->is_external(); } | 2150 bool is_external() const { return hydrogen()->is_external(); } |
| 2151 bool is_fixed_typed_array() const { |
| 2152 return hydrogen()->is_fixed_typed_array(); |
| 2153 } |
| 2154 bool is_typed_elements() const { |
| 2155 return is_external() || is_fixed_typed_array(); |
| 2156 } |
| 2170 LOperand* elements() { return inputs_[0]; } | 2157 LOperand* elements() { return inputs_[0]; } |
| 2171 LOperand* key() { return inputs_[1]; } | 2158 LOperand* key() { return inputs_[1]; } |
| 2172 LOperand* value() { return inputs_[2]; } | 2159 LOperand* value() { return inputs_[2]; } |
| 2173 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 2160 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
| 2174 | 2161 |
| 2175 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2162 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
| 2176 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2163 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
| 2177 | 2164 |
| 2178 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2165 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2179 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } | 2166 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2762 | 2749 |
| 2763 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2750 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2764 }; | 2751 }; |
| 2765 | 2752 |
| 2766 #undef DECLARE_HYDROGEN_ACCESSOR | 2753 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2767 #undef DECLARE_CONCRETE_INSTRUCTION | 2754 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2768 | 2755 |
| 2769 } } // namespace v8::int | 2756 } } // namespace v8::int |
| 2770 | 2757 |
| 2771 #endif // V8_X64_LITHIUM_X64_H_ | 2758 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |