Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 1254623002: Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_IA32_LITHIUM_IA32_H_ 5 #ifndef V8_IA32_LITHIUM_IA32_H_
6 #define V8_IA32_LITHIUM_IA32_H_ 6 #define V8_IA32_LITHIUM_IA32_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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 public: 1634 public:
1635 LLoadKeyed(LOperand* elements, LOperand* key) { 1635 LLoadKeyed(LOperand* elements, LOperand* key) {
1636 inputs_[0] = elements; 1636 inputs_[0] = elements;
1637 inputs_[1] = key; 1637 inputs_[1] = key;
1638 } 1638 }
1639 LOperand* elements() { return inputs_[0]; } 1639 LOperand* elements() { return inputs_[0]; }
1640 LOperand* key() { return inputs_[1]; } 1640 LOperand* key() { return inputs_[1]; }
1641 ElementsKind elements_kind() const { 1641 ElementsKind elements_kind() const {
1642 return hydrogen()->elements_kind(); 1642 return hydrogen()->elements_kind();
1643 } 1643 }
1644 bool is_external() const {
1645 return hydrogen()->is_external();
1646 }
1647 bool is_fixed_typed_array() const { 1644 bool is_fixed_typed_array() const {
1648 return hydrogen()->is_fixed_typed_array(); 1645 return hydrogen()->is_fixed_typed_array();
1649 } 1646 }
1650 bool is_typed_elements() const {
1651 return is_external() || is_fixed_typed_array();
1652 }
1653 1647
1654 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1648 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1655 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1649 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1656 1650
1657 void PrintDataTo(StringStream* stream) override; 1651 void PrintDataTo(StringStream* stream) override;
1658 uint32_t base_offset() const { return hydrogen()->base_offset(); } 1652 uint32_t base_offset() const { return hydrogen()->base_offset(); }
1659 bool key_is_smi() { 1653 bool key_is_smi() {
1660 return hydrogen()->key()->representation().IsTagged(); 1654 return hydrogen()->key()->representation().IsTagged();
1661 } 1655 }
1662 }; 1656 };
1663 1657
1664 1658
1665 inline static bool ExternalArrayOpRequiresTemp( 1659 inline static bool ExternalArrayOpRequiresTemp(
1666 Representation key_representation, 1660 Representation key_representation,
1667 ElementsKind elements_kind) { 1661 ElementsKind elements_kind) {
1668 // Operations that require the key to be divided by two to be converted into 1662 // Operations that require the key to be divided by two to be converted into
1669 // an index cannot fold the scale operation into a load and need an extra 1663 // an index cannot fold the scale operation into a load and need an extra
1670 // temp register to do the work. 1664 // temp register to do the work.
1671 return key_representation.IsSmi() && 1665 return key_representation.IsSmi() &&
1672 (elements_kind == EXTERNAL_INT8_ELEMENTS || 1666 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS ||
1673 elements_kind == EXTERNAL_UINT8_ELEMENTS || 1667 elements_kind == UINT8_CLAMPED_ELEMENTS);
1674 elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS ||
1675 elements_kind == UINT8_ELEMENTS ||
1676 elements_kind == INT8_ELEMENTS ||
1677 elements_kind == UINT8_CLAMPED_ELEMENTS);
1678 } 1668 }
1679 1669
1680 1670
1681 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { 1671 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> {
1682 public: 1672 public:
1683 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key, 1673 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key,
1684 LOperand* vector) { 1674 LOperand* vector) {
1685 inputs_[0] = context; 1675 inputs_[0] = context;
1686 inputs_[1] = obj; 1676 inputs_[1] = obj;
1687 inputs_[2] = key; 1677 inputs_[2] = key;
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 2242
2253 2243
2254 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { 2244 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> {
2255 public: 2245 public:
2256 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 2246 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) {
2257 inputs_[0] = obj; 2247 inputs_[0] = obj;
2258 inputs_[1] = key; 2248 inputs_[1] = key;
2259 inputs_[2] = val; 2249 inputs_[2] = val;
2260 } 2250 }
2261 2251
2262 bool is_external() const { return hydrogen()->is_external(); }
2263 bool is_fixed_typed_array() const { 2252 bool is_fixed_typed_array() const {
2264 return hydrogen()->is_fixed_typed_array(); 2253 return hydrogen()->is_fixed_typed_array();
2265 } 2254 }
2266 bool is_typed_elements() const {
2267 return is_external() || is_fixed_typed_array();
2268 }
2269 LOperand* elements() { return inputs_[0]; } 2255 LOperand* elements() { return inputs_[0]; }
2270 LOperand* key() { return inputs_[1]; } 2256 LOperand* key() { return inputs_[1]; }
2271 LOperand* value() { return inputs_[2]; } 2257 LOperand* value() { return inputs_[2]; }
2272 ElementsKind elements_kind() const { 2258 ElementsKind elements_kind() const {
2273 return hydrogen()->elements_kind(); 2259 return hydrogen()->elements_kind();
2274 } 2260 }
2275 2261
2276 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2262 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2277 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2263 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2278 2264
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 2918
2933 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2919 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2934 }; 2920 };
2935 2921
2936 #undef DECLARE_HYDROGEN_ACCESSOR 2922 #undef DECLARE_HYDROGEN_ACCESSOR
2937 #undef DECLARE_CONCRETE_INSTRUCTION 2923 #undef DECLARE_CONCRETE_INSTRUCTION
2938 2924
2939 } } // namespace v8::internal 2925 } } // namespace v8::internal
2940 2926
2941 #endif // V8_IA32_LITHIUM_IA32_H_ 2927 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698