| 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 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 5 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
| 6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
| 7 | 7 |
| 8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
| 9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
| 10 #include "src/crankshaft/lithium-allocator.h" | 10 #include "src/crankshaft/lithium-allocator.h" |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 | 1537 |
| 1538 class LLoadRoot final : public LTemplateInstruction<1, 0, 0> { | 1538 class LLoadRoot final : public LTemplateInstruction<1, 0, 0> { |
| 1539 public: | 1539 public: |
| 1540 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1540 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
| 1541 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1541 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
| 1542 | 1542 |
| 1543 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1543 Heap::RootListIndex index() const { return hydrogen()->index(); } |
| 1544 }; | 1544 }; |
| 1545 | 1545 |
| 1546 | 1546 |
| 1547 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> { | 1547 class LLoadKeyed final : public LTemplateInstruction<1, 3, 0> { |
| 1548 public: | 1548 public: |
| 1549 LLoadKeyed(LOperand* elements, LOperand* key) { | 1549 LLoadKeyed(LOperand* elements, LOperand* key, LOperand* backing_store_owner) { |
| 1550 inputs_[0] = elements; | 1550 inputs_[0] = elements; |
| 1551 inputs_[1] = key; | 1551 inputs_[1] = key; |
| 1552 inputs_[2] = backing_store_owner; |
| 1552 } | 1553 } |
| 1553 | 1554 |
| 1554 LOperand* elements() { return inputs_[0]; } | 1555 LOperand* elements() { return inputs_[0]; } |
| 1555 LOperand* key() { return inputs_[1]; } | 1556 LOperand* key() { return inputs_[1]; } |
| 1557 LOperand* backing_store_owner() { return inputs_[2]; } |
| 1556 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 1558 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
| 1557 bool is_fixed_typed_array() const { | 1559 bool is_fixed_typed_array() const { |
| 1558 return hydrogen()->is_fixed_typed_array(); | 1560 return hydrogen()->is_fixed_typed_array(); |
| 1559 } | 1561 } |
| 1560 | 1562 |
| 1561 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1563 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| 1562 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1564 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| 1563 | 1565 |
| 1564 void PrintDataTo(StringStream* stream) override; | 1566 void PrintDataTo(StringStream* stream) override; |
| 1565 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1567 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2059 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
| 2058 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2060 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 2059 | 2061 |
| 2060 void PrintDataTo(StringStream* stream) override; | 2062 void PrintDataTo(StringStream* stream) override; |
| 2061 | 2063 |
| 2062 Handle<Object> name() const { return hydrogen()->name(); } | 2064 Handle<Object> name() const { return hydrogen()->name(); } |
| 2063 LanguageMode language_mode() { return hydrogen()->language_mode(); } | 2065 LanguageMode language_mode() { return hydrogen()->language_mode(); } |
| 2064 }; | 2066 }; |
| 2065 | 2067 |
| 2066 | 2068 |
| 2067 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { | 2069 class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> { |
| 2068 public: | 2070 public: |
| 2069 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2071 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value, |
| 2072 LOperand* backing_store_owner) { |
| 2070 inputs_[0] = object; | 2073 inputs_[0] = object; |
| 2071 inputs_[1] = key; | 2074 inputs_[1] = key; |
| 2072 inputs_[2] = value; | 2075 inputs_[2] = value; |
| 2076 inputs_[3] = backing_store_owner; |
| 2073 } | 2077 } |
| 2074 | 2078 |
| 2075 bool is_fixed_typed_array() const { | 2079 bool is_fixed_typed_array() const { |
| 2076 return hydrogen()->is_fixed_typed_array(); | 2080 return hydrogen()->is_fixed_typed_array(); |
| 2077 } | 2081 } |
| 2078 LOperand* elements() { return inputs_[0]; } | 2082 LOperand* elements() { return inputs_[0]; } |
| 2079 LOperand* key() { return inputs_[1]; } | 2083 LOperand* key() { return inputs_[1]; } |
| 2080 LOperand* value() { return inputs_[2]; } | 2084 LOperand* value() { return inputs_[2]; } |
| 2085 LOperand* backing_store_owner() { return inputs_[3]; } |
| 2081 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 2086 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
| 2082 | 2087 |
| 2083 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2088 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
| 2084 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2089 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
| 2085 | 2090 |
| 2086 void PrintDataTo(StringStream* stream) override; | 2091 void PrintDataTo(StringStream* stream) override; |
| 2087 bool NeedsCanonicalization() { | 2092 bool NeedsCanonicalization() { |
| 2088 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || | 2093 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || |
| 2089 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { | 2094 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { |
| 2090 return false; | 2095 return false; |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2673 | 2678 |
| 2674 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2679 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2675 }; | 2680 }; |
| 2676 | 2681 |
| 2677 #undef DECLARE_HYDROGEN_ACCESSOR | 2682 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2678 #undef DECLARE_CONCRETE_INSTRUCTION | 2683 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2679 } // namespace internal | 2684 } // namespace internal |
| 2680 } // namespace v8 | 2685 } // namespace v8 |
| 2681 | 2686 |
| 2682 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 2687 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
| OLD | NEW |