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

Side by Side Diff: src/code-stubs.h

Issue 2695653005: Revert of Remove SIMD.js from V8. (Closed)
Patch Set: Created 3 years, 10 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/code-stub-assembler.cc ('k') | src/code-stubs.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_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 /* --- HydrogenCodeStubs --- */ \ 59 /* --- HydrogenCodeStubs --- */ \
60 /* These should never be ported to TF */ \ 60 /* These should never be ported to TF */ \
61 /* because they are either used only by */ \ 61 /* because they are either used only by */ \
62 /* FCG/Crankshaft or are deprecated */ \ 62 /* FCG/Crankshaft or are deprecated */ \
63 V(BinaryOpIC) \ 63 V(BinaryOpIC) \
64 V(BinaryOpWithAllocationSite) \ 64 V(BinaryOpWithAllocationSite) \
65 V(ToBooleanIC) \ 65 V(ToBooleanIC) \
66 V(TransitionElementsKind) \ 66 V(TransitionElementsKind) \
67 /* --- TurboFanCodeStubs --- */ \ 67 /* --- TurboFanCodeStubs --- */ \
68 V(AllocateHeapNumber) \ 68 V(AllocateHeapNumber) \
69 V(AllocateFloat32x4) \
70 V(AllocateInt32x4) \
71 V(AllocateUint32x4) \
72 V(AllocateBool32x4) \
73 V(AllocateInt16x8) \
74 V(AllocateUint16x8) \
75 V(AllocateBool16x8) \
76 V(AllocateInt8x16) \
77 V(AllocateUint8x16) \
78 V(AllocateBool8x16) \
69 V(ArrayNoArgumentConstructor) \ 79 V(ArrayNoArgumentConstructor) \
70 V(ArraySingleArgumentConstructor) \ 80 V(ArraySingleArgumentConstructor) \
71 V(ArrayNArgumentsConstructor) \ 81 V(ArrayNArgumentsConstructor) \
72 V(CreateAllocationSite) \ 82 V(CreateAllocationSite) \
73 V(CreateWeakCell) \ 83 V(CreateWeakCell) \
74 V(StringLength) \ 84 V(StringLength) \
75 V(AddWithFeedback) \ 85 V(AddWithFeedback) \
76 V(SubtractWithFeedback) \ 86 V(SubtractWithFeedback) \
77 V(MultiplyWithFeedback) \ 87 V(MultiplyWithFeedback) \
78 V(DivideWithFeedback) \ 88 V(DivideWithFeedback) \
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 public: 1561 public:
1552 explicit AllocateHeapNumberStub(Isolate* isolate) 1562 explicit AllocateHeapNumberStub(Isolate* isolate)
1553 : TurboFanCodeStub(isolate) {} 1563 : TurboFanCodeStub(isolate) {}
1554 1564
1555 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; 1565 void InitializeDescriptor(CodeStubDescriptor* descriptor) override;
1556 1566
1557 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateHeapNumber); 1567 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateHeapNumber);
1558 DEFINE_TURBOFAN_CODE_STUB(AllocateHeapNumber, TurboFanCodeStub); 1568 DEFINE_TURBOFAN_CODE_STUB(AllocateHeapNumber, TurboFanCodeStub);
1559 }; 1569 };
1560 1570
1571 #define SIMD128_ALLOC_STUB(TYPE, Type, type, lane_count, lane_type) \
1572 class Allocate##Type##Stub : public TurboFanCodeStub { \
1573 public: \
1574 explicit Allocate##Type##Stub(Isolate* isolate) \
1575 : TurboFanCodeStub(isolate) {} \
1576 \
1577 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; \
1578 void GenerateAssembly(compiler::CodeAssemblerState* state) const override; \
1579 \
1580 DEFINE_CALL_INTERFACE_DESCRIPTOR(Allocate##Type); \
1581 DEFINE_CODE_STUB(Allocate##Type, TurboFanCodeStub); \
1582 };
1583 SIMD128_TYPES(SIMD128_ALLOC_STUB)
1584 #undef SIMD128_ALLOC_STUB
1585
1561 class CommonArrayConstructorStub : public TurboFanCodeStub { 1586 class CommonArrayConstructorStub : public TurboFanCodeStub {
1562 protected: 1587 protected:
1563 CommonArrayConstructorStub(Isolate* isolate, ElementsKind kind, 1588 CommonArrayConstructorStub(Isolate* isolate, ElementsKind kind,
1564 AllocationSiteOverrideMode override_mode) 1589 AllocationSiteOverrideMode override_mode)
1565 : TurboFanCodeStub(isolate) { 1590 : TurboFanCodeStub(isolate) {
1566 // It only makes sense to override local allocation site behavior 1591 // It only makes sense to override local allocation site behavior
1567 // if there is a difference between the global allocation site policy 1592 // if there is a difference between the global allocation site policy
1568 // for an ElementsKind and the desired usage of the stub. 1593 // for an ElementsKind and the desired usage of the stub.
1569 DCHECK(override_mode != DISABLE_ALLOCATION_SITES || 1594 DCHECK(override_mode != DISABLE_ALLOCATION_SITES ||
1570 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); 1595 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 return ::v8::internal::UNINITIALIZED; 1747 return ::v8::internal::UNINITIALIZED;
1723 } else { 1748 } else {
1724 return MONOMORPHIC; 1749 return MONOMORPHIC;
1725 } 1750 }
1726 } 1751 }
1727 1752
1728 private: 1753 private:
1729 ToBooleanICStub(Isolate* isolate, InitializationState init_state) 1754 ToBooleanICStub(Isolate* isolate, InitializationState init_state)
1730 : HydrogenCodeStub(isolate, init_state) {} 1755 : HydrogenCodeStub(isolate, init_state) {}
1731 1756
1732 static const int kNumHints = 8; 1757 static const int kNumHints = 9;
1733 STATIC_ASSERT(static_cast<int>(ToBooleanHint::kAny) == 1758 STATIC_ASSERT(static_cast<int>(ToBooleanHint::kAny) ==
1734 ((1 << kNumHints) - 1)); 1759 ((1 << kNumHints) - 1));
1735 class HintsBits : public BitField<uint16_t, 0, kNumHints> {}; 1760 class HintsBits : public BitField<uint16_t, 0, kNumHints> {};
1736 1761
1737 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); 1762 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion);
1738 DEFINE_HYDROGEN_CODE_STUB(ToBooleanIC, HydrogenCodeStub); 1763 DEFINE_HYDROGEN_CODE_STUB(ToBooleanIC, HydrogenCodeStub);
1739 }; 1764 };
1740 1765
1741 class ElementsTransitionAndStoreStub : public TurboFanCodeStub { 1766 class ElementsTransitionAndStoreStub : public TurboFanCodeStub {
1742 public: 1767 public:
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 #undef DEFINE_PLATFORM_CODE_STUB 1874 #undef DEFINE_PLATFORM_CODE_STUB
1850 #undef DEFINE_HANDLER_CODE_STUB 1875 #undef DEFINE_HANDLER_CODE_STUB
1851 #undef DEFINE_HYDROGEN_CODE_STUB 1876 #undef DEFINE_HYDROGEN_CODE_STUB
1852 #undef DEFINE_CODE_STUB 1877 #undef DEFINE_CODE_STUB
1853 #undef DEFINE_CODE_STUB_BASE 1878 #undef DEFINE_CODE_STUB_BASE
1854 1879
1855 } // namespace internal 1880 } // namespace internal
1856 } // namespace v8 1881 } // namespace v8
1857 1882
1858 #endif // V8_CODE_STUBS_H_ 1883 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698