| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 V(InternalArrayConstructor) \ | 42 V(InternalArrayConstructor) \ |
| 43 V(JSEntry) \ | 43 V(JSEntry) \ |
| 44 V(LoadIndexedString) \ | 44 V(LoadIndexedString) \ |
| 45 V(MathPow) \ | 45 V(MathPow) \ |
| 46 V(ProfileEntryHook) \ | 46 V(ProfileEntryHook) \ |
| 47 V(RecordWrite) \ | 47 V(RecordWrite) \ |
| 48 V(RegExpExec) \ | 48 V(RegExpExec) \ |
| 49 V(StoreBufferOverflow) \ | 49 V(StoreBufferOverflow) \ |
| 50 V(StoreElement) \ | 50 V(StoreElement) \ |
| 51 V(SubString) \ | 51 V(SubString) \ |
| 52 V(FastNewRestParameter) \ | |
| 53 V(FastNewSloppyArguments) \ | |
| 54 V(FastNewStrictArguments) \ | |
| 55 V(NameDictionaryLookup) \ | 52 V(NameDictionaryLookup) \ |
| 56 /* This can be removed once there are no */ \ | 53 /* This can be removed once there are no */ \ |
| 57 /* more deopting Hydrogen stubs. */ \ | 54 /* more deopting Hydrogen stubs. */ \ |
| 58 V(StubFailureTrampoline) \ | 55 V(StubFailureTrampoline) \ |
| 59 /* These are only called from FCG */ \ | 56 /* These are only called from FCG */ \ |
| 60 /* They can be removed when only the TF */ \ | 57 /* They can be removed when only the TF */ \ |
| 61 /* version of the corresponding stub is */ \ | 58 /* version of the corresponding stub is */ \ |
| 62 /* used universally */ \ | 59 /* used universally */ \ |
| 63 V(CallICTrampoline) \ | 60 V(CallICTrampoline) \ |
| 64 /* --- HydrogenCodeStubs --- */ \ | 61 /* --- HydrogenCodeStubs --- */ \ |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 }; | 739 }; |
| 743 | 740 |
| 744 class NumberToStringStub final : public TurboFanCodeStub { | 741 class NumberToStringStub final : public TurboFanCodeStub { |
| 745 public: | 742 public: |
| 746 explicit NumberToStringStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 743 explicit NumberToStringStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 747 | 744 |
| 748 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | 745 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); |
| 749 DEFINE_TURBOFAN_CODE_STUB(NumberToString, TurboFanCodeStub); | 746 DEFINE_TURBOFAN_CODE_STUB(NumberToString, TurboFanCodeStub); |
| 750 }; | 747 }; |
| 751 | 748 |
| 752 // TODO(turbofan): This stub should be possible to write in TurboFan | |
| 753 // using the CodeStubAssembler very soon in a way that is as efficient | |
| 754 // and easy as the current handwritten version, which is partly a copy | |
| 755 // of the strict arguments object materialization code. | |
| 756 class FastNewRestParameterStub final : public PlatformCodeStub { | |
| 757 public: | |
| 758 explicit FastNewRestParameterStub(Isolate* isolate, | |
| 759 bool skip_stub_frame = false) | |
| 760 : PlatformCodeStub(isolate) { | |
| 761 minor_key_ = SkipStubFrameBits::encode(skip_stub_frame); | |
| 762 } | |
| 763 | |
| 764 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewRestParameter); | |
| 765 DEFINE_PLATFORM_CODE_STUB(FastNewRestParameter, PlatformCodeStub); | |
| 766 | |
| 767 int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); } | |
| 768 | |
| 769 private: | |
| 770 class SkipStubFrameBits : public BitField<bool, 0, 1> {}; | |
| 771 }; | |
| 772 | |
| 773 | |
| 774 // TODO(turbofan): This stub should be possible to write in TurboFan | |
| 775 // using the CodeStubAssembler very soon in a way that is as efficient | |
| 776 // and easy as the current handwritten version. | |
| 777 class FastNewSloppyArgumentsStub final : public PlatformCodeStub { | |
| 778 public: | |
| 779 explicit FastNewSloppyArgumentsStub(Isolate* isolate, | |
| 780 bool skip_stub_frame = false) | |
| 781 : PlatformCodeStub(isolate) { | |
| 782 minor_key_ = SkipStubFrameBits::encode(skip_stub_frame); | |
| 783 } | |
| 784 | |
| 785 int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); } | |
| 786 | |
| 787 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewSloppyArguments); | |
| 788 DEFINE_PLATFORM_CODE_STUB(FastNewSloppyArguments, PlatformCodeStub); | |
| 789 | |
| 790 private: | |
| 791 class SkipStubFrameBits : public BitField<bool, 0, 1> {}; | |
| 792 }; | |
| 793 | |
| 794 | |
| 795 // TODO(turbofan): This stub should be possible to write in TurboFan | |
| 796 // using the CodeStubAssembler very soon in a way that is as efficient | |
| 797 // and easy as the current handwritten version. | |
| 798 class FastNewStrictArgumentsStub final : public PlatformCodeStub { | |
| 799 public: | |
| 800 explicit FastNewStrictArgumentsStub(Isolate* isolate, | |
| 801 bool skip_stub_frame = false) | |
| 802 : PlatformCodeStub(isolate) { | |
| 803 minor_key_ = SkipStubFrameBits::encode(skip_stub_frame); | |
| 804 } | |
| 805 | |
| 806 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewStrictArguments); | |
| 807 DEFINE_PLATFORM_CODE_STUB(FastNewStrictArguments, PlatformCodeStub); | |
| 808 | |
| 809 int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); } | |
| 810 | |
| 811 private: | |
| 812 class SkipStubFrameBits : public BitField<bool, 0, 1> {}; | |
| 813 }; | |
| 814 | |
| 815 class CreateAllocationSiteStub : public TurboFanCodeStub { | 749 class CreateAllocationSiteStub : public TurboFanCodeStub { |
| 816 public: | 750 public: |
| 817 explicit CreateAllocationSiteStub(Isolate* isolate) | 751 explicit CreateAllocationSiteStub(Isolate* isolate) |
| 818 : TurboFanCodeStub(isolate) {} | 752 : TurboFanCodeStub(isolate) {} |
| 819 static void GenerateAheadOfTime(Isolate* isolate); | 753 static void GenerateAheadOfTime(Isolate* isolate); |
| 820 | 754 |
| 821 DEFINE_CALL_INTERFACE_DESCRIPTOR(CreateAllocationSite); | 755 DEFINE_CALL_INTERFACE_DESCRIPTOR(CreateAllocationSite); |
| 822 DEFINE_TURBOFAN_CODE_STUB(CreateAllocationSite, TurboFanCodeStub); | 756 DEFINE_TURBOFAN_CODE_STUB(CreateAllocationSite, TurboFanCodeStub); |
| 823 }; | 757 }; |
| 824 | 758 |
| (...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2109 #undef DEFINE_PLATFORM_CODE_STUB | 2043 #undef DEFINE_PLATFORM_CODE_STUB |
| 2110 #undef DEFINE_HANDLER_CODE_STUB | 2044 #undef DEFINE_HANDLER_CODE_STUB |
| 2111 #undef DEFINE_HYDROGEN_CODE_STUB | 2045 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2112 #undef DEFINE_CODE_STUB | 2046 #undef DEFINE_CODE_STUB |
| 2113 #undef DEFINE_CODE_STUB_BASE | 2047 #undef DEFINE_CODE_STUB_BASE |
| 2114 | 2048 |
| 2115 } // namespace internal | 2049 } // namespace internal |
| 2116 } // namespace v8 | 2050 } // namespace v8 |
| 2117 | 2051 |
| 2118 #endif // V8_CODE_STUBS_H_ | 2052 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |