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_PPC_LITHIUM_PPC_H_ | 5 #ifndef V8_PPC_LITHIUM_PPC_H_ |
6 #define V8_PPC_LITHIUM_PPC_H_ | 6 #define V8_PPC_LITHIUM_PPC_H_ |
7 | 7 |
8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1580 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> { | 1580 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> { |
1581 public: | 1581 public: |
1582 LLoadKeyed(LOperand* elements, LOperand* key) { | 1582 LLoadKeyed(LOperand* elements, LOperand* key) { |
1583 inputs_[0] = elements; | 1583 inputs_[0] = elements; |
1584 inputs_[1] = key; | 1584 inputs_[1] = key; |
1585 } | 1585 } |
1586 | 1586 |
1587 LOperand* elements() { return inputs_[0]; } | 1587 LOperand* elements() { return inputs_[0]; } |
1588 LOperand* key() { return inputs_[1]; } | 1588 LOperand* key() { return inputs_[1]; } |
1589 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 1589 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
1590 bool is_external() const { return hydrogen()->is_external(); } | |
1591 bool is_fixed_typed_array() const { | 1590 bool is_fixed_typed_array() const { |
1592 return hydrogen()->is_fixed_typed_array(); | 1591 return hydrogen()->is_fixed_typed_array(); |
1593 } | 1592 } |
1594 bool is_typed_elements() const { | |
1595 return is_external() || is_fixed_typed_array(); | |
1596 } | |
1597 | 1593 |
1598 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1594 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1599 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1595 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1600 | 1596 |
1601 void PrintDataTo(StringStream* stream) override; | 1597 void PrintDataTo(StringStream* stream) override; |
1602 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1598 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
1603 }; | 1599 }; |
1604 | 1600 |
1605 | 1601 |
1606 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { | 1602 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 | 2157 |
2162 | 2158 |
2163 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { | 2159 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { |
2164 public: | 2160 public: |
2165 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2161 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
2166 inputs_[0] = object; | 2162 inputs_[0] = object; |
2167 inputs_[1] = key; | 2163 inputs_[1] = key; |
2168 inputs_[2] = value; | 2164 inputs_[2] = value; |
2169 } | 2165 } |
2170 | 2166 |
2171 bool is_external() const { return hydrogen()->is_external(); } | |
2172 bool is_fixed_typed_array() const { | 2167 bool is_fixed_typed_array() const { |
2173 return hydrogen()->is_fixed_typed_array(); | 2168 return hydrogen()->is_fixed_typed_array(); |
2174 } | 2169 } |
2175 bool is_typed_elements() const { | |
2176 return is_external() || is_fixed_typed_array(); | |
2177 } | |
2178 LOperand* elements() { return inputs_[0]; } | 2170 LOperand* elements() { return inputs_[0]; } |
2179 LOperand* key() { return inputs_[1]; } | 2171 LOperand* key() { return inputs_[1]; } |
2180 LOperand* value() { return inputs_[2]; } | 2172 LOperand* value() { return inputs_[2]; } |
2181 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 2173 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
2182 | 2174 |
2183 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2175 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
2184 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2176 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
2185 | 2177 |
2186 void PrintDataTo(StringStream* stream) override; | 2178 void PrintDataTo(StringStream* stream) override; |
2187 bool NeedsCanonicalization() { | 2179 bool NeedsCanonicalization() { |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2806 | 2798 |
2807 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2799 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2808 }; | 2800 }; |
2809 | 2801 |
2810 #undef DECLARE_HYDROGEN_ACCESSOR | 2802 #undef DECLARE_HYDROGEN_ACCESSOR |
2811 #undef DECLARE_CONCRETE_INSTRUCTION | 2803 #undef DECLARE_CONCRETE_INSTRUCTION |
2812 } | 2804 } |
2813 } // namespace v8::internal | 2805 } // namespace v8::internal |
2814 | 2806 |
2815 #endif // V8_PPC_LITHIUM_PPC_H_ | 2807 #endif // V8_PPC_LITHIUM_PPC_H_ |
OLD | NEW |