OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS_LITHIUM_MIPS_H_ | 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ |
6 #define V8_MIPS_LITHIUM_MIPS_H_ | 6 #define V8_MIPS_LITHIUM_MIPS_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 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 LLoadKeyed(LOperand* elements, LOperand* key) { | 1665 LLoadKeyed(LOperand* elements, LOperand* key) { |
1666 inputs_[0] = elements; | 1666 inputs_[0] = elements; |
1667 inputs_[1] = key; | 1667 inputs_[1] = key; |
1668 } | 1668 } |
1669 | 1669 |
1670 LOperand* elements() { return inputs_[0]; } | 1670 LOperand* elements() { return inputs_[0]; } |
1671 LOperand* key() { return inputs_[1]; } | 1671 LOperand* key() { return inputs_[1]; } |
1672 ElementsKind elements_kind() const { | 1672 ElementsKind elements_kind() const { |
1673 return hydrogen()->elements_kind(); | 1673 return hydrogen()->elements_kind(); |
1674 } | 1674 } |
1675 bool is_external() const { | |
1676 return hydrogen()->is_external(); | |
1677 } | |
1678 bool is_fixed_typed_array() const { | 1675 bool is_fixed_typed_array() const { |
1679 return hydrogen()->is_fixed_typed_array(); | 1676 return hydrogen()->is_fixed_typed_array(); |
1680 } | 1677 } |
1681 bool is_typed_elements() const { | |
1682 return is_external() || is_fixed_typed_array(); | |
1683 } | |
1684 | 1678 |
1685 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1679 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1686 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1680 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1687 | 1681 |
1688 void PrintDataTo(StringStream* stream) override; | 1682 void PrintDataTo(StringStream* stream) override; |
1689 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1683 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
1690 }; | 1684 }; |
1691 | 1685 |
1692 | 1686 |
1693 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { | 1687 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 | 2249 |
2256 | 2250 |
2257 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { | 2251 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { |
2258 public: | 2252 public: |
2259 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2253 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
2260 inputs_[0] = object; | 2254 inputs_[0] = object; |
2261 inputs_[1] = key; | 2255 inputs_[1] = key; |
2262 inputs_[2] = value; | 2256 inputs_[2] = value; |
2263 } | 2257 } |
2264 | 2258 |
2265 bool is_external() const { return hydrogen()->is_external(); } | |
2266 bool is_fixed_typed_array() const { | 2259 bool is_fixed_typed_array() const { |
2267 return hydrogen()->is_fixed_typed_array(); | 2260 return hydrogen()->is_fixed_typed_array(); |
2268 } | 2261 } |
2269 bool is_typed_elements() const { | |
2270 return is_external() || is_fixed_typed_array(); | |
2271 } | |
2272 LOperand* elements() { return inputs_[0]; } | 2262 LOperand* elements() { return inputs_[0]; } |
2273 LOperand* key() { return inputs_[1]; } | 2263 LOperand* key() { return inputs_[1]; } |
2274 LOperand* value() { return inputs_[2]; } | 2264 LOperand* value() { return inputs_[2]; } |
2275 ElementsKind elements_kind() const { | 2265 ElementsKind elements_kind() const { |
2276 return hydrogen()->elements_kind(); | 2266 return hydrogen()->elements_kind(); |
2277 } | 2267 } |
2278 | 2268 |
2279 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2269 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
2280 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2270 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
2281 | 2271 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2936 | 2926 |
2937 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2927 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2938 }; | 2928 }; |
2939 | 2929 |
2940 #undef DECLARE_HYDROGEN_ACCESSOR | 2930 #undef DECLARE_HYDROGEN_ACCESSOR |
2941 #undef DECLARE_CONCRETE_INSTRUCTION | 2931 #undef DECLARE_CONCRETE_INSTRUCTION |
2942 | 2932 |
2943 } } // namespace v8::internal | 2933 } } // namespace v8::internal |
2944 | 2934 |
2945 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2935 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |