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