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

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

Issue 1262583002: Reland of "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
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 2240
2251 2241
2252 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { 2242 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> {
2253 public: 2243 public:
2254 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 2244 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) {
2255 inputs_[0] = obj; 2245 inputs_[0] = obj;
2256 inputs_[1] = key; 2246 inputs_[1] = key;
2257 inputs_[2] = val; 2247 inputs_[2] = val;
2258 } 2248 }
2259 2249
2260 bool is_external() const { return hydrogen()->is_external(); }
2261 bool is_fixed_typed_array() const { 2250 bool is_fixed_typed_array() const {
2262 return hydrogen()->is_fixed_typed_array(); 2251 return hydrogen()->is_fixed_typed_array();
2263 } 2252 }
2264 bool is_typed_elements() const {
2265 return is_external() || is_fixed_typed_array();
2266 }
2267 LOperand* elements() { return inputs_[0]; } 2253 LOperand* elements() { return inputs_[0]; }
2268 LOperand* key() { return inputs_[1]; } 2254 LOperand* key() { return inputs_[1]; }
2269 LOperand* value() { return inputs_[2]; } 2255 LOperand* value() { return inputs_[2]; }
2270 ElementsKind elements_kind() const { 2256 ElementsKind elements_kind() const {
2271 return hydrogen()->elements_kind(); 2257 return hydrogen()->elements_kind();
2272 } 2258 }
2273 2259
2274 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2260 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2275 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2261 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2276 2262
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2930 2916
2931 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2917 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2932 }; 2918 };
2933 2919
2934 #undef DECLARE_HYDROGEN_ACCESSOR 2920 #undef DECLARE_HYDROGEN_ACCESSOR
2935 #undef DECLARE_CONCRETE_INSTRUCTION 2921 #undef DECLARE_CONCRETE_INSTRUCTION
2936 2922
2937 } } // namespace v8::internal 2923 } } // namespace v8::internal
2938 2924
2939 #endif // V8_IA32_LITHIUM_IA32_H_ 2925 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698