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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 V(StringGreaterThanOrEqual) \ | 115 V(StringGreaterThanOrEqual) \ |
116 V(ToBoolean) \ | 116 V(ToBoolean) \ |
117 /* IC Handler stubs */ \ | 117 /* IC Handler stubs */ \ |
118 V(ArrayBufferViewLoadField) \ | 118 V(ArrayBufferViewLoadField) \ |
119 V(LoadConstant) \ | 119 V(LoadConstant) \ |
120 V(LoadFastElement) \ | 120 V(LoadFastElement) \ |
121 V(LoadField) \ | 121 V(LoadField) \ |
122 V(KeyedLoadSloppyArguments) \ | 122 V(KeyedLoadSloppyArguments) \ |
123 V(KeyedStoreSloppyArguments) \ | 123 V(KeyedStoreSloppyArguments) \ |
124 V(StoreField) \ | 124 V(StoreField) \ |
| 125 V(StoreInterceptor) \ |
125 V(StoreGlobal) \ | 126 V(StoreGlobal) \ |
126 V(StoreTransition) | 127 V(StoreTransition) |
127 | 128 |
128 // List of code stubs only used on ARM 32 bits platforms. | 129 // List of code stubs only used on ARM 32 bits platforms. |
129 #if V8_TARGET_ARCH_ARM | 130 #if V8_TARGET_ARCH_ARM |
130 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) | 131 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) |
131 | 132 |
132 #else | 133 #else |
133 #define CODE_STUB_LIST_ARM(V) | 134 #define CODE_STUB_LIST_ARM(V) |
134 #endif | 135 #endif |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 }; | 771 }; |
771 | 772 |
772 class ToBooleanStub final : public TurboFanCodeStub { | 773 class ToBooleanStub final : public TurboFanCodeStub { |
773 public: | 774 public: |
774 explicit ToBooleanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 775 explicit ToBooleanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
775 | 776 |
776 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | 777 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); |
777 DEFINE_TURBOFAN_CODE_STUB(ToBoolean, TurboFanCodeStub); | 778 DEFINE_TURBOFAN_CODE_STUB(ToBoolean, TurboFanCodeStub); |
778 }; | 779 }; |
779 | 780 |
| 781 class StoreInterceptorStub : public TurboFanCodeStub { |
| 782 public: |
| 783 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 784 |
| 785 void GenerateAssembly(compiler::CodeStubAssembler* assember) const override; |
| 786 |
| 787 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 788 |
| 789 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); |
| 790 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); |
| 791 }; |
| 792 |
780 enum StringAddFlags { | 793 enum StringAddFlags { |
781 // Omit both parameter checks. | 794 // Omit both parameter checks. |
782 STRING_ADD_CHECK_NONE = 0, | 795 STRING_ADD_CHECK_NONE = 0, |
783 // Check left parameter. | 796 // Check left parameter. |
784 STRING_ADD_CHECK_LEFT = 1 << 0, | 797 STRING_ADD_CHECK_LEFT = 1 << 0, |
785 // Check right parameter. | 798 // Check right parameter. |
786 STRING_ADD_CHECK_RIGHT = 1 << 1, | 799 STRING_ADD_CHECK_RIGHT = 1 << 1, |
787 // Check both parameters. | 800 // Check both parameters. |
788 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, | 801 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, |
789 // Convert parameters when check fails (instead of throwing an exception). | 802 // Convert parameters when check fails (instead of throwing an exception). |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 explicit AllocateMutableHeapNumberStub(Isolate* isolate) | 2553 explicit AllocateMutableHeapNumberStub(Isolate* isolate) |
2541 : TurboFanCodeStub(isolate) {} | 2554 : TurboFanCodeStub(isolate) {} |
2542 | 2555 |
2543 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; | 2556 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; |
2544 void GenerateAssembly(compiler::CodeStubAssembler* assembler) const override; | 2557 void GenerateAssembly(compiler::CodeStubAssembler* assembler) const override; |
2545 | 2558 |
2546 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateMutableHeapNumber); | 2559 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateMutableHeapNumber); |
2547 DEFINE_CODE_STUB(AllocateMutableHeapNumber, TurboFanCodeStub); | 2560 DEFINE_CODE_STUB(AllocateMutableHeapNumber, TurboFanCodeStub); |
2548 }; | 2561 }; |
2549 | 2562 |
2550 | |
2551 class AllocateInNewSpaceStub final : public HydrogenCodeStub { | 2563 class AllocateInNewSpaceStub final : public HydrogenCodeStub { |
2552 public: | 2564 public: |
2553 explicit AllocateInNewSpaceStub(Isolate* isolate) | 2565 explicit AllocateInNewSpaceStub(Isolate* isolate) |
2554 : HydrogenCodeStub(isolate) {} | 2566 : HydrogenCodeStub(isolate) {} |
2555 | 2567 |
2556 private: | 2568 private: |
2557 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateInNewSpace); | 2569 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateInNewSpace); |
2558 DEFINE_HYDROGEN_CODE_STUB(AllocateInNewSpace, HydrogenCodeStub); | 2570 DEFINE_HYDROGEN_CODE_STUB(AllocateInNewSpace, HydrogenCodeStub); |
2559 }; | 2571 }; |
2560 | 2572 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2978 #undef DEFINE_HYDROGEN_CODE_STUB | 2990 #undef DEFINE_HYDROGEN_CODE_STUB |
2979 #undef DEFINE_CODE_STUB | 2991 #undef DEFINE_CODE_STUB |
2980 #undef DEFINE_CODE_STUB_BASE | 2992 #undef DEFINE_CODE_STUB_BASE |
2981 | 2993 |
2982 extern Representation RepresentationFromType(Type* type); | 2994 extern Representation RepresentationFromType(Type* type); |
2983 | 2995 |
2984 } // namespace internal | 2996 } // namespace internal |
2985 } // namespace v8 | 2997 } // namespace v8 |
2986 | 2998 |
2987 #endif // V8_CODE_STUBS_H_ | 2999 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |