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

Side by Side Diff: src/crankshaft/x64/lithium-x64.h

Issue 1511433005: Version 4.8.271.9 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.8
Patch Set: Created 5 years 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/crankshaft/ppc/lithium-ppc.cc ('k') | src/crankshaft/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_CRANKSHAFT_X64_LITHIUM_X64_H_ 5 #ifndef V8_CRANKSHAFT_X64_LITHIUM_X64_H_
6 #define V8_CRANKSHAFT_X64_LITHIUM_X64_H_ 6 #define V8_CRANKSHAFT_X64_LITHIUM_X64_H_
7 7
8 #include "src/crankshaft/hydrogen.h" 8 #include "src/crankshaft/hydrogen.h"
9 #include "src/crankshaft/lithium.h" 9 #include "src/crankshaft/lithium.h"
10 #include "src/crankshaft/lithium-allocator.h" 10 #include "src/crankshaft/lithium-allocator.h"
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 ElementsKind elements_kind) { 1587 ElementsKind elements_kind) {
1588 // Operations that require the key to be divided by two to be converted into 1588 // Operations that require the key to be divided by two to be converted into
1589 // an index cannot fold the scale operation into a load and need an extra 1589 // an index cannot fold the scale operation into a load and need an extra
1590 // temp register to do the work. 1590 // temp register to do the work.
1591 return SmiValuesAre31Bits() && key_representation.IsSmi() && 1591 return SmiValuesAre31Bits() && key_representation.IsSmi() &&
1592 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS || 1592 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS ||
1593 elements_kind == UINT8_CLAMPED_ELEMENTS); 1593 elements_kind == UINT8_CLAMPED_ELEMENTS);
1594 } 1594 }
1595 1595
1596 1596
1597 class LLoadKeyed final : public LTemplateInstruction<1, 2, 0> { 1597 class LLoadKeyed final : public LTemplateInstruction<1, 3, 0> {
1598 public: 1598 public:
1599 LLoadKeyed(LOperand* elements, LOperand* key) { 1599 LLoadKeyed(LOperand* elements, LOperand* key, LOperand* backing_store_owner) {
1600 inputs_[0] = elements; 1600 inputs_[0] = elements;
1601 inputs_[1] = key; 1601 inputs_[1] = key;
1602 inputs_[2] = backing_store_owner;
1602 } 1603 }
1603 1604
1604 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1605 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1605 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1606 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1606 1607
1607 bool is_fixed_typed_array() const { 1608 bool is_fixed_typed_array() const {
1608 return hydrogen()->is_fixed_typed_array(); 1609 return hydrogen()->is_fixed_typed_array();
1609 } 1610 }
1610 LOperand* elements() { return inputs_[0]; } 1611 LOperand* elements() { return inputs_[0]; }
1611 LOperand* key() { return inputs_[1]; } 1612 LOperand* key() { return inputs_[1]; }
1613 LOperand* backing_store_owner() { return inputs_[2]; }
1612 void PrintDataTo(StringStream* stream) override; 1614 void PrintDataTo(StringStream* stream) override;
1613 uint32_t base_offset() const { return hydrogen()->base_offset(); } 1615 uint32_t base_offset() const { return hydrogen()->base_offset(); }
1614 ElementsKind elements_kind() const { 1616 ElementsKind elements_kind() const {
1615 return hydrogen()->elements_kind(); 1617 return hydrogen()->elements_kind();
1616 } 1618 }
1617 }; 1619 };
1618 1620
1619 1621
1620 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { 1622 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> {
1621 public: 1623 public:
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2144 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2143 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2145 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2144 2146
2145 void PrintDataTo(StringStream* stream) override; 2147 void PrintDataTo(StringStream* stream) override;
2146 2148
2147 Handle<Object> name() const { return hydrogen()->name(); } 2149 Handle<Object> name() const { return hydrogen()->name(); }
2148 LanguageMode language_mode() { return hydrogen()->language_mode(); } 2150 LanguageMode language_mode() { return hydrogen()->language_mode(); }
2149 }; 2151 };
2150 2152
2151 2153
2152 class LStoreKeyed final : public LTemplateInstruction<0, 3, 0> { 2154 class LStoreKeyed final : public LTemplateInstruction<0, 4, 0> {
2153 public: 2155 public:
2154 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2156 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value,
2157 LOperand* backing_store_owner) {
2155 inputs_[0] = object; 2158 inputs_[0] = object;
2156 inputs_[1] = key; 2159 inputs_[1] = key;
2157 inputs_[2] = value; 2160 inputs_[2] = value;
2161 inputs_[3] = backing_store_owner;
2158 } 2162 }
2159 2163
2160 bool is_fixed_typed_array() const { 2164 bool is_fixed_typed_array() const {
2161 return hydrogen()->is_fixed_typed_array(); 2165 return hydrogen()->is_fixed_typed_array();
2162 } 2166 }
2163 LOperand* elements() { return inputs_[0]; } 2167 LOperand* elements() { return inputs_[0]; }
2164 LOperand* key() { return inputs_[1]; } 2168 LOperand* key() { return inputs_[1]; }
2165 LOperand* value() { return inputs_[2]; } 2169 LOperand* value() { return inputs_[2]; }
2170 LOperand* backing_store_owner() { return inputs_[3]; }
2166 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } 2171 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
2167 2172
2168 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2173 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2169 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2174 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2170 2175
2171 void PrintDataTo(StringStream* stream) override; 2176 void PrintDataTo(StringStream* stream) override;
2172 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 2177 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
2173 uint32_t base_offset() const { return hydrogen()->base_offset(); } 2178 uint32_t base_offset() const { return hydrogen()->base_offset(); }
2174 }; 2179 };
2175 2180
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2826 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2822 }; 2827 };
2823 2828
2824 #undef DECLARE_HYDROGEN_ACCESSOR 2829 #undef DECLARE_HYDROGEN_ACCESSOR
2825 #undef DECLARE_CONCRETE_INSTRUCTION 2830 #undef DECLARE_CONCRETE_INSTRUCTION
2826 2831
2827 } // namespace internal 2832 } // namespace internal
2828 } // namespace v8 2833 } // namespace v8
2829 2834
2830 #endif // V8_CRANKSHAFT_X64_LITHIUM_X64_H_ 2835 #endif // V8_CRANKSHAFT_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-ppc.cc ('k') | src/crankshaft/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698