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

Side by Side Diff: src/crankshaft/arm64/lithium-arm64.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/arm/lithium-arm.cc ('k') | src/crankshaft/arm64/lithium-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64_LITHIUM_ARM64_H_ 5 #ifndef V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_
6 #define V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_ 6 #define V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_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 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 LOperand* temp_vector() { return temps_[0]; } 1707 LOperand* temp_vector() { return temps_[0]; }
1708 1708
1709 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1709 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1710 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1710 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1711 1711
1712 Handle<Object> name() const { return hydrogen()->name(); } 1712 Handle<Object> name() const { return hydrogen()->name(); }
1713 TypeofMode typeof_mode() const { return hydrogen()->typeof_mode(); } 1713 TypeofMode typeof_mode() const { return hydrogen()->typeof_mode(); }
1714 }; 1714 };
1715 1715
1716 1716
1717 template<int T> 1717 template <int T>
1718 class LLoadKeyed : public LTemplateInstruction<1, 2, T> { 1718 class LLoadKeyed : public LTemplateInstruction<1, 3, T> {
1719 public: 1719 public:
1720 LLoadKeyed(LOperand* elements, LOperand* key) { 1720 LLoadKeyed(LOperand* elements, LOperand* key, LOperand* backing_store_owner) {
1721 this->inputs_[0] = elements; 1721 this->inputs_[0] = elements;
1722 this->inputs_[1] = key; 1722 this->inputs_[1] = key;
1723 this->inputs_[2] = backing_store_owner;
1723 } 1724 }
1724 1725
1725 LOperand* elements() { return this->inputs_[0]; } 1726 LOperand* elements() { return this->inputs_[0]; }
1726 LOperand* key() { return this->inputs_[1]; } 1727 LOperand* key() { return this->inputs_[1]; }
1728 LOperand* backing_store_owner() { return this->inputs_[2]; }
1727 ElementsKind elements_kind() const { 1729 ElementsKind elements_kind() const {
1728 return this->hydrogen()->elements_kind(); 1730 return this->hydrogen()->elements_kind();
1729 } 1731 }
1730 bool is_external() const { 1732 bool is_external() const {
1731 return this->hydrogen()->is_external(); 1733 return this->hydrogen()->is_external();
1732 } 1734 }
1733 bool is_fixed_typed_array() const { 1735 bool is_fixed_typed_array() const {
1734 return hydrogen()->is_fixed_typed_array(); 1736 return hydrogen()->is_fixed_typed_array();
1735 } 1737 }
1736 bool is_typed_elements() const { 1738 bool is_typed_elements() const {
(...skipping 12 matching lines...) Expand all
1749 stream->Add("]"); 1751 stream->Add("]");
1750 } 1752 }
1751 } 1753 }
1752 1754
1753 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1755 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1754 }; 1756 };
1755 1757
1756 1758
1757 class LLoadKeyedExternal: public LLoadKeyed<1> { 1759 class LLoadKeyedExternal: public LLoadKeyed<1> {
1758 public: 1760 public:
1759 LLoadKeyedExternal(LOperand* elements, LOperand* key, LOperand* temp) : 1761 LLoadKeyedExternal(LOperand* elements, LOperand* key,
1760 LLoadKeyed<1>(elements, key) { 1762 LOperand* backing_store_owner, LOperand* temp)
1763 : LLoadKeyed<1>(elements, key, backing_store_owner) {
1761 temps_[0] = temp; 1764 temps_[0] = temp;
1762 } 1765 }
1763 1766
1764 LOperand* temp() { return temps_[0]; } 1767 LOperand* temp() { return temps_[0]; }
1765 1768
1766 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedExternal, "load-keyed-external"); 1769 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedExternal, "load-keyed-external");
1767 }; 1770 };
1768 1771
1769 1772
1770 class LLoadKeyedFixed: public LLoadKeyed<1> { 1773 class LLoadKeyedFixed: public LLoadKeyed<1> {
1771 public: 1774 public:
1772 LLoadKeyedFixed(LOperand* elements, LOperand* key, LOperand* temp) : 1775 LLoadKeyedFixed(LOperand* elements, LOperand* key, LOperand* temp)
1773 LLoadKeyed<1>(elements, key) { 1776 : LLoadKeyed<1>(elements, key, nullptr) {
1774 temps_[0] = temp; 1777 temps_[0] = temp;
1775 } 1778 }
1776 1779
1777 LOperand* temp() { return temps_[0]; } 1780 LOperand* temp() { return temps_[0]; }
1778 1781
1779 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixed, "load-keyed-fixed"); 1782 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixed, "load-keyed-fixed");
1780 }; 1783 };
1781 1784
1782 1785
1783 class LLoadKeyedFixedDouble: public LLoadKeyed<1> { 1786 class LLoadKeyedFixedDouble: public LLoadKeyed<1> {
1784 public: 1787 public:
1785 LLoadKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* temp) : 1788 LLoadKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* temp)
1786 LLoadKeyed<1>(elements, key) { 1789 : LLoadKeyed<1>(elements, key, nullptr) {
1787 temps_[0] = temp; 1790 temps_[0] = temp;
1788 } 1791 }
1789 1792
1790 LOperand* temp() { return temps_[0]; } 1793 LOperand* temp() { return temps_[0]; }
1791 1794
1792 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double"); 1795 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double");
1793 }; 1796 };
1794 1797
1795 1798
1796 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { 1799 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> {
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2413 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2411 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2414 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2412 2415
2413 Label* done_label() { return &done_label_; } 2416 Label* done_label() { return &done_label_; }
2414 2417
2415 private: 2418 private:
2416 Label done_label_; 2419 Label done_label_;
2417 }; 2420 };
2418 2421
2419 2422
2420 template<int T> 2423 template <int T>
2421 class LStoreKeyed : public LTemplateInstruction<0, 3, T> { 2424 class LStoreKeyed : public LTemplateInstruction<0, 4, T> {
2422 public: 2425 public:
2423 LStoreKeyed(LOperand* elements, LOperand* key, LOperand* value) { 2426 LStoreKeyed(LOperand* elements, LOperand* key, LOperand* value,
2427 LOperand* backing_store_owner) {
2424 this->inputs_[0] = elements; 2428 this->inputs_[0] = elements;
2425 this->inputs_[1] = key; 2429 this->inputs_[1] = key;
2426 this->inputs_[2] = value; 2430 this->inputs_[2] = value;
2431 this->inputs_[3] = backing_store_owner;
2427 } 2432 }
2428 2433
2429 bool is_external() const { return this->hydrogen()->is_external(); } 2434 bool is_external() const { return this->hydrogen()->is_external(); }
2430 bool is_fixed_typed_array() const { 2435 bool is_fixed_typed_array() const {
2431 return hydrogen()->is_fixed_typed_array(); 2436 return hydrogen()->is_fixed_typed_array();
2432 } 2437 }
2433 bool is_typed_elements() const { 2438 bool is_typed_elements() const {
2434 return is_external() || is_fixed_typed_array(); 2439 return is_external() || is_fixed_typed_array();
2435 } 2440 }
2436 LOperand* elements() { return this->inputs_[0]; } 2441 LOperand* elements() { return this->inputs_[0]; }
2437 LOperand* key() { return this->inputs_[1]; } 2442 LOperand* key() { return this->inputs_[1]; }
2438 LOperand* value() { return this->inputs_[2]; } 2443 LOperand* value() { return this->inputs_[2]; }
2444 LOperand* backing_store_owner() { return this->inputs_[3]; }
2439 ElementsKind elements_kind() const { 2445 ElementsKind elements_kind() const {
2440 return this->hydrogen()->elements_kind(); 2446 return this->hydrogen()->elements_kind();
2441 } 2447 }
2442 2448
2443 bool NeedsCanonicalization() { 2449 bool NeedsCanonicalization() {
2444 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || 2450 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() ||
2445 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { 2451 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) {
2446 return false; 2452 return false;
2447 } 2453 }
2448 return this->hydrogen()->NeedsCanonicalization(); 2454 return this->hydrogen()->NeedsCanonicalization();
(...skipping 19 matching lines...) Expand all
2468 } 2474 }
2469 } 2475 }
2470 2476
2471 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2477 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2472 }; 2478 };
2473 2479
2474 2480
2475 class LStoreKeyedExternal final : public LStoreKeyed<1> { 2481 class LStoreKeyedExternal final : public LStoreKeyed<1> {
2476 public: 2482 public:
2477 LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value, 2483 LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value,
2478 LOperand* temp) : 2484 LOperand* backing_store_owner, LOperand* temp)
2479 LStoreKeyed<1>(elements, key, value) { 2485 : LStoreKeyed<1>(elements, key, value, backing_store_owner) {
2480 temps_[0] = temp; 2486 temps_[0] = temp;
2481 } 2487 }
2482 2488
2483 LOperand* temp() { return temps_[0]; } 2489 LOperand* temp() { return temps_[0]; }
2484 2490
2485 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedExternal, "store-keyed-external") 2491 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedExternal, "store-keyed-external")
2486 }; 2492 };
2487 2493
2488 2494
2489 class LStoreKeyedFixed final : public LStoreKeyed<1> { 2495 class LStoreKeyedFixed final : public LStoreKeyed<1> {
2490 public: 2496 public:
2491 LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value, 2497 LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value,
2492 LOperand* temp) : 2498 LOperand* temp)
2493 LStoreKeyed<1>(elements, key, value) { 2499 : LStoreKeyed<1>(elements, key, value, nullptr) {
2494 temps_[0] = temp; 2500 temps_[0] = temp;
2495 } 2501 }
2496 2502
2497 LOperand* temp() { return temps_[0]; } 2503 LOperand* temp() { return temps_[0]; }
2498 2504
2499 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixed, "store-keyed-fixed") 2505 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixed, "store-keyed-fixed")
2500 }; 2506 };
2501 2507
2502 2508
2503 class LStoreKeyedFixedDouble final : public LStoreKeyed<1> { 2509 class LStoreKeyedFixedDouble final : public LStoreKeyed<1> {
2504 public: 2510 public:
2505 LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value, 2511 LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value,
2506 LOperand* temp) : 2512 LOperand* temp)
2507 LStoreKeyed<1>(elements, key, value) { 2513 : LStoreKeyed<1>(elements, key, value, nullptr) {
2508 temps_[0] = temp; 2514 temps_[0] = temp;
2509 } 2515 }
2510 2516
2511 LOperand* temp() { return temps_[0]; } 2517 LOperand* temp() { return temps_[0]; }
2512 2518
2513 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixedDouble, 2519 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixedDouble,
2514 "store-keyed-fixed-double") 2520 "store-keyed-fixed-double")
2515 }; 2521 };
2516 2522
2517 2523
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
3211 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 3217 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
3212 }; 3218 };
3213 3219
3214 #undef DECLARE_HYDROGEN_ACCESSOR 3220 #undef DECLARE_HYDROGEN_ACCESSOR
3215 #undef DECLARE_CONCRETE_INSTRUCTION 3221 #undef DECLARE_CONCRETE_INSTRUCTION
3216 3222
3217 } // namespace internal 3223 } // namespace internal
3218 } // namespace v8 3224 } // namespace v8
3219 3225
3220 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_ 3226 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/arm64/lithium-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698