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