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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1540 | 1540 |
1541 class LLoadRoot final : public LTemplateInstruction<1, 0, 0> { | 1541 class LLoadRoot final : public LTemplateInstruction<1, 0, 0> { |
1542 public: | 1542 public: |
1543 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1543 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
1544 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1544 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
1545 | 1545 |
1546 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1546 Heap::RootListIndex index() const { return hydrogen()->index(); } |
1547 }; | 1547 }; |
1548 | 1548 |
1549 | 1549 |
1550 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> { | 1550 class LLoadKeyed final : public LTemplateInstruction<1, 3, 0> { |
1551 public: | 1551 public: |
1552 LLoadKeyed(LOperand* elements, LOperand* key) { | 1552 LLoadKeyed(LOperand* elements, LOperand* key, LOperand* backing_store_owner) { |
1553 inputs_[0] = elements; | 1553 inputs_[0] = elements; |
1554 inputs_[1] = key; | 1554 inputs_[1] = key; |
| 1555 inputs_[2] = backing_store_owner; |
1555 } | 1556 } |
1556 | 1557 |
1557 LOperand* elements() { return inputs_[0]; } | 1558 LOperand* elements() { return inputs_[0]; } |
1558 LOperand* key() { return inputs_[1]; } | 1559 LOperand* key() { return inputs_[1]; } |
| 1560 LOperand* backing_store_owner() { return inputs_[2]; } |
1559 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 1561 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
1560 bool is_fixed_typed_array() const { | 1562 bool is_fixed_typed_array() const { |
1561 return hydrogen()->is_fixed_typed_array(); | 1563 return hydrogen()->is_fixed_typed_array(); |
1562 } | 1564 } |
1563 | 1565 |
1564 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1566 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1565 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1567 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1566 | 1568 |
1567 void PrintDataTo(StringStream* stream) override; | 1569 void PrintDataTo(StringStream* stream) override; |
1568 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1570 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2079 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2081 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
2080 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2082 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
2081 | 2083 |
2082 void PrintDataTo(StringStream* stream) override; | 2084 void PrintDataTo(StringStream* stream) override; |
2083 | 2085 |
2084 Handle<Object> name() const { return hydrogen()->name(); } | 2086 Handle<Object> name() const { return hydrogen()->name(); } |
2085 LanguageMode language_mode() { return hydrogen()->language_mode(); } | 2087 LanguageMode language_mode() { return hydrogen()->language_mode(); } |
2086 }; | 2088 }; |
2087 | 2089 |
2088 | 2090 |
2089 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { | 2091 class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> { |
2090 public: | 2092 public: |
2091 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2093 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value, |
| 2094 LOperand* backing_store_owner) { |
2092 inputs_[0] = object; | 2095 inputs_[0] = object; |
2093 inputs_[1] = key; | 2096 inputs_[1] = key; |
2094 inputs_[2] = value; | 2097 inputs_[2] = value; |
| 2098 inputs_[3] = backing_store_owner; |
2095 } | 2099 } |
2096 | 2100 |
2097 bool is_fixed_typed_array() const { | 2101 bool is_fixed_typed_array() const { |
2098 return hydrogen()->is_fixed_typed_array(); | 2102 return hydrogen()->is_fixed_typed_array(); |
2099 } | 2103 } |
2100 LOperand* elements() { return inputs_[0]; } | 2104 LOperand* elements() { return inputs_[0]; } |
2101 LOperand* key() { return inputs_[1]; } | 2105 LOperand* key() { return inputs_[1]; } |
2102 LOperand* value() { return inputs_[2]; } | 2106 LOperand* value() { return inputs_[2]; } |
| 2107 LOperand* backing_store_owner() { return inputs_[3]; } |
2103 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 2108 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
2104 | 2109 |
2105 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2110 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
2106 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2111 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
2107 | 2112 |
2108 void PrintDataTo(StringStream* stream) override; | 2113 void PrintDataTo(StringStream* stream) override; |
2109 bool NeedsCanonicalization() { | 2114 bool NeedsCanonicalization() { |
2110 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || | 2115 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || |
2111 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { | 2116 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { |
2112 return false; | 2117 return false; |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2717 | 2722 |
2718 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2723 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2719 }; | 2724 }; |
2720 | 2725 |
2721 #undef DECLARE_HYDROGEN_ACCESSOR | 2726 #undef DECLARE_HYDROGEN_ACCESSOR |
2722 #undef DECLARE_CONCRETE_INSTRUCTION | 2727 #undef DECLARE_CONCRETE_INSTRUCTION |
2723 } // namespace internal | 2728 } // namespace internal |
2724 } // namespace v8 | 2729 } // namespace v8 |
2725 | 2730 |
2726 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 2731 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
OLD | NEW |