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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 LLoadKeyed(LOperand* elements, LOperand* key) { | 1603 LLoadKeyed(LOperand* elements, LOperand* key) { |
1604 inputs_[0] = elements; | 1604 inputs_[0] = elements; |
1605 inputs_[1] = key; | 1605 inputs_[1] = key; |
1606 } | 1606 } |
1607 | 1607 |
1608 LOperand* elements() { return inputs_[0]; } | 1608 LOperand* elements() { return inputs_[0]; } |
1609 LOperand* key() { return inputs_[1]; } | 1609 LOperand* key() { return inputs_[1]; } |
1610 ElementsKind elements_kind() const { | 1610 ElementsKind elements_kind() const { |
1611 return hydrogen()->elements_kind(); | 1611 return hydrogen()->elements_kind(); |
1612 } | 1612 } |
1613 bool is_external() const { | |
1614 return hydrogen()->is_external(); | |
1615 } | |
1616 bool is_fixed_typed_array() const { | 1613 bool is_fixed_typed_array() const { |
1617 return hydrogen()->is_fixed_typed_array(); | 1614 return hydrogen()->is_fixed_typed_array(); |
1618 } | 1615 } |
1619 bool is_typed_elements() const { | |
1620 return is_external() || is_fixed_typed_array(); | |
1621 } | |
1622 | 1616 |
1623 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1617 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1624 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1618 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1625 | 1619 |
1626 void PrintDataTo(StringStream* stream) override; | 1620 void PrintDataTo(StringStream* stream) override; |
1627 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1621 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
1628 }; | 1622 }; |
1629 | 1623 |
1630 | 1624 |
1631 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { | 1625 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2211 | 2205 |
2212 | 2206 |
2213 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { | 2207 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { |
2214 public: | 2208 public: |
2215 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2209 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
2216 inputs_[0] = object; | 2210 inputs_[0] = object; |
2217 inputs_[1] = key; | 2211 inputs_[1] = key; |
2218 inputs_[2] = value; | 2212 inputs_[2] = value; |
2219 } | 2213 } |
2220 | 2214 |
2221 bool is_external() const { return hydrogen()->is_external(); } | |
2222 bool is_fixed_typed_array() const { | 2215 bool is_fixed_typed_array() const { |
2223 return hydrogen()->is_fixed_typed_array(); | 2216 return hydrogen()->is_fixed_typed_array(); |
2224 } | 2217 } |
2225 bool is_typed_elements() const { | |
2226 return is_external() || is_fixed_typed_array(); | |
2227 } | |
2228 LOperand* elements() { return inputs_[0]; } | 2218 LOperand* elements() { return inputs_[0]; } |
2229 LOperand* key() { return inputs_[1]; } | 2219 LOperand* key() { return inputs_[1]; } |
2230 LOperand* value() { return inputs_[2]; } | 2220 LOperand* value() { return inputs_[2]; } |
2231 ElementsKind elements_kind() const { | 2221 ElementsKind elements_kind() const { |
2232 return hydrogen()->elements_kind(); | 2222 return hydrogen()->elements_kind(); |
2233 } | 2223 } |
2234 | 2224 |
2235 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2225 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
2236 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2226 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
2237 | 2227 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2892 | 2882 |
2893 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2883 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2894 }; | 2884 }; |
2895 | 2885 |
2896 #undef DECLARE_HYDROGEN_ACCESSOR | 2886 #undef DECLARE_HYDROGEN_ACCESSOR |
2897 #undef DECLARE_CONCRETE_INSTRUCTION | 2887 #undef DECLARE_CONCRETE_INSTRUCTION |
2898 | 2888 |
2899 } } // namespace v8::internal | 2889 } } // namespace v8::internal |
2900 | 2890 |
2901 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2891 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |