| OLD | NEW |
| 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 Loading... |
| 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) \ | |
| 79 V(ArrayNoArgumentConstructor) \ | 69 V(ArrayNoArgumentConstructor) \ |
| 80 V(ArraySingleArgumentConstructor) \ | 70 V(ArraySingleArgumentConstructor) \ |
| 81 V(ArrayNArgumentsConstructor) \ | 71 V(ArrayNArgumentsConstructor) \ |
| 82 V(CreateAllocationSite) \ | 72 V(CreateAllocationSite) \ |
| 83 V(CreateWeakCell) \ | 73 V(CreateWeakCell) \ |
| 84 V(StringLength) \ | 74 V(StringLength) \ |
| 85 V(AddWithFeedback) \ | 75 V(AddWithFeedback) \ |
| 86 V(SubtractWithFeedback) \ | 76 V(SubtractWithFeedback) \ |
| 87 V(MultiplyWithFeedback) \ | 77 V(MultiplyWithFeedback) \ |
| 88 V(DivideWithFeedback) \ | 78 V(DivideWithFeedback) \ |
| (...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1561 public: | 1551 public: |
| 1562 explicit AllocateHeapNumberStub(Isolate* isolate) | 1552 explicit AllocateHeapNumberStub(Isolate* isolate) |
| 1563 : TurboFanCodeStub(isolate) {} | 1553 : TurboFanCodeStub(isolate) {} |
| 1564 | 1554 |
| 1565 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; | 1555 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; |
| 1566 | 1556 |
| 1567 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateHeapNumber); | 1557 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateHeapNumber); |
| 1568 DEFINE_TURBOFAN_CODE_STUB(AllocateHeapNumber, TurboFanCodeStub); | 1558 DEFINE_TURBOFAN_CODE_STUB(AllocateHeapNumber, TurboFanCodeStub); |
| 1569 }; | 1559 }; |
| 1570 | 1560 |
| 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 | |
| 1586 class CommonArrayConstructorStub : public TurboFanCodeStub { | 1561 class CommonArrayConstructorStub : public TurboFanCodeStub { |
| 1587 protected: | 1562 protected: |
| 1588 CommonArrayConstructorStub(Isolate* isolate, ElementsKind kind, | 1563 CommonArrayConstructorStub(Isolate* isolate, ElementsKind kind, |
| 1589 AllocationSiteOverrideMode override_mode) | 1564 AllocationSiteOverrideMode override_mode) |
| 1590 : TurboFanCodeStub(isolate) { | 1565 : TurboFanCodeStub(isolate) { |
| 1591 // It only makes sense to override local allocation site behavior | 1566 // It only makes sense to override local allocation site behavior |
| 1592 // if there is a difference between the global allocation site policy | 1567 // if there is a difference between the global allocation site policy |
| 1593 // for an ElementsKind and the desired usage of the stub. | 1568 // for an ElementsKind and the desired usage of the stub. |
| 1594 DCHECK(override_mode != DISABLE_ALLOCATION_SITES || | 1569 DCHECK(override_mode != DISABLE_ALLOCATION_SITES || |
| 1595 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); | 1570 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 return ::v8::internal::UNINITIALIZED; | 1722 return ::v8::internal::UNINITIALIZED; |
| 1748 } else { | 1723 } else { |
| 1749 return MONOMORPHIC; | 1724 return MONOMORPHIC; |
| 1750 } | 1725 } |
| 1751 } | 1726 } |
| 1752 | 1727 |
| 1753 private: | 1728 private: |
| 1754 ToBooleanICStub(Isolate* isolate, InitializationState init_state) | 1729 ToBooleanICStub(Isolate* isolate, InitializationState init_state) |
| 1755 : HydrogenCodeStub(isolate, init_state) {} | 1730 : HydrogenCodeStub(isolate, init_state) {} |
| 1756 | 1731 |
| 1757 static const int kNumHints = 9; | 1732 static const int kNumHints = 8; |
| 1758 STATIC_ASSERT(static_cast<int>(ToBooleanHint::kAny) == | 1733 STATIC_ASSERT(static_cast<int>(ToBooleanHint::kAny) == |
| 1759 ((1 << kNumHints) - 1)); | 1734 ((1 << kNumHints) - 1)); |
| 1760 class HintsBits : public BitField<uint16_t, 0, kNumHints> {}; | 1735 class HintsBits : public BitField<uint16_t, 0, kNumHints> {}; |
| 1761 | 1736 |
| 1762 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | 1737 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); |
| 1763 DEFINE_HYDROGEN_CODE_STUB(ToBooleanIC, HydrogenCodeStub); | 1738 DEFINE_HYDROGEN_CODE_STUB(ToBooleanIC, HydrogenCodeStub); |
| 1764 }; | 1739 }; |
| 1765 | 1740 |
| 1766 class ElementsTransitionAndStoreStub : public TurboFanCodeStub { | 1741 class ElementsTransitionAndStoreStub : public TurboFanCodeStub { |
| 1767 public: | 1742 public: |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1874 #undef DEFINE_PLATFORM_CODE_STUB | 1849 #undef DEFINE_PLATFORM_CODE_STUB |
| 1875 #undef DEFINE_HANDLER_CODE_STUB | 1850 #undef DEFINE_HANDLER_CODE_STUB |
| 1876 #undef DEFINE_HYDROGEN_CODE_STUB | 1851 #undef DEFINE_HYDROGEN_CODE_STUB |
| 1877 #undef DEFINE_CODE_STUB | 1852 #undef DEFINE_CODE_STUB |
| 1878 #undef DEFINE_CODE_STUB_BASE | 1853 #undef DEFINE_CODE_STUB_BASE |
| 1879 | 1854 |
| 1880 } // namespace internal | 1855 } // namespace internal |
| 1881 } // namespace v8 | 1856 } // namespace v8 |
| 1882 | 1857 |
| 1883 #endif // V8_CODE_STUBS_H_ | 1858 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |