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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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_X64_LITHIUM_X64_H_ 5 #ifndef V8_X64_LITHIUM_X64_H_
6 #define V8_X64_LITHIUM_X64_H_ 6 #define V8_X64_LITHIUM_X64_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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 }; 1610 };
1611 1611
1612 1612
1613 inline static bool ExternalArrayOpRequiresTemp( 1613 inline static bool ExternalArrayOpRequiresTemp(
1614 Representation key_representation, 1614 Representation key_representation,
1615 ElementsKind elements_kind) { 1615 ElementsKind elements_kind) {
1616 // Operations that require the key to be divided by two to be converted into 1616 // Operations that require the key to be divided by two to be converted into
1617 // an index cannot fold the scale operation into a load and need an extra 1617 // an index cannot fold the scale operation into a load and need an extra
1618 // temp register to do the work. 1618 // temp register to do the work.
1619 return SmiValuesAre31Bits() && key_representation.IsSmi() && 1619 return SmiValuesAre31Bits() && key_representation.IsSmi() &&
1620 (elements_kind == EXTERNAL_INT8_ELEMENTS || 1620 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS ||
1621 elements_kind == EXTERNAL_UINT8_ELEMENTS || 1621 elements_kind == UINT8_CLAMPED_ELEMENTS);
1622 elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS ||
1623 elements_kind == UINT8_ELEMENTS ||
1624 elements_kind == INT8_ELEMENTS ||
1625 elements_kind == UINT8_CLAMPED_ELEMENTS);
1626 } 1622 }
1627 1623
1628 1624
1629 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> { 1625 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> {
1630 public: 1626 public:
1631 LLoadKeyed(LOperand* elements, LOperand* key) { 1627 LLoadKeyed(LOperand* elements, LOperand* key) {
1632 inputs_[0] = elements; 1628 inputs_[0] = elements;
1633 inputs_[1] = key; 1629 inputs_[1] = key;
1634 } 1630 }
1635 1631
1636 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1632 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1637 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1633 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1638 1634
1639 bool is_external() const {
1640 return hydrogen()->is_external();
1641 }
1642 bool is_fixed_typed_array() const { 1635 bool is_fixed_typed_array() const {
1643 return hydrogen()->is_fixed_typed_array(); 1636 return hydrogen()->is_fixed_typed_array();
1644 } 1637 }
1645 bool is_typed_elements() const {
1646 return is_external() || is_fixed_typed_array();
1647 }
1648 LOperand* elements() { return inputs_[0]; } 1638 LOperand* elements() { return inputs_[0]; }
1649 LOperand* key() { return inputs_[1]; } 1639 LOperand* key() { return inputs_[1]; }
1650 void PrintDataTo(StringStream* stream) override; 1640 void PrintDataTo(StringStream* stream) override;
1651 uint32_t base_offset() const { return hydrogen()->base_offset(); } 1641 uint32_t base_offset() const { return hydrogen()->base_offset(); }
1652 ElementsKind elements_kind() const { 1642 ElementsKind elements_kind() const {
1653 return hydrogen()->elements_kind(); 1643 return hydrogen()->elements_kind();
1654 } 1644 }
1655 }; 1645 };
1656 1646
1657 1647
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 2216
2227 2217
2228 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { 2218 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> {
2229 public: 2219 public:
2230 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2220 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2231 inputs_[0] = object; 2221 inputs_[0] = object;
2232 inputs_[1] = key; 2222 inputs_[1] = key;
2233 inputs_[2] = value; 2223 inputs_[2] = value;
2234 } 2224 }
2235 2225
2236 bool is_external() const { return hydrogen()->is_external(); }
2237 bool is_fixed_typed_array() const { 2226 bool is_fixed_typed_array() const {
2238 return hydrogen()->is_fixed_typed_array(); 2227 return hydrogen()->is_fixed_typed_array();
2239 } 2228 }
2240 bool is_typed_elements() const {
2241 return is_external() || is_fixed_typed_array();
2242 }
2243 LOperand* elements() { return inputs_[0]; } 2229 LOperand* elements() { return inputs_[0]; }
2244 LOperand* key() { return inputs_[1]; } 2230 LOperand* key() { return inputs_[1]; }
2245 LOperand* value() { return inputs_[2]; } 2231 LOperand* value() { return inputs_[2]; }
2246 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } 2232 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
2247 2233
2248 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2234 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2249 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2235 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2250 2236
2251 void PrintDataTo(StringStream* stream) override; 2237 void PrintDataTo(StringStream* stream) override;
2252 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 2238 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 2899
2914 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2900 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2915 }; 2901 };
2916 2902
2917 #undef DECLARE_HYDROGEN_ACCESSOR 2903 #undef DECLARE_HYDROGEN_ACCESSOR
2918 #undef DECLARE_CONCRETE_INSTRUCTION 2904 #undef DECLARE_CONCRETE_INSTRUCTION
2919 2905
2920 } } // namespace v8::int 2906 } } // namespace v8::int
2921 2907
2922 #endif // V8_X64_LITHIUM_X64_H_ 2908 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698