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 { | |
Benedikt Meurer
2016/03/21 09:22:29
Doesn't this need to say HANDLER for Code kind?
| |
782 public: | |
783 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
784 | |
785 void GenerateAssembly(compiler::CodeStubAssembler* assember) const override; | |
786 | |
787 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); | |
788 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); | |
789 }; | |
790 | |
780 enum StringAddFlags { | 791 enum StringAddFlags { |
781 // Omit both parameter checks. | 792 // Omit both parameter checks. |
782 STRING_ADD_CHECK_NONE = 0, | 793 STRING_ADD_CHECK_NONE = 0, |
783 // Check left parameter. | 794 // Check left parameter. |
784 STRING_ADD_CHECK_LEFT = 1 << 0, | 795 STRING_ADD_CHECK_LEFT = 1 << 0, |
785 // Check right parameter. | 796 // Check right parameter. |
786 STRING_ADD_CHECK_RIGHT = 1 << 1, | 797 STRING_ADD_CHECK_RIGHT = 1 << 1, |
787 // Check both parameters. | 798 // Check both parameters. |
788 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, | 799 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, |
789 // Convert parameters when check fails (instead of throwing an exception). | 800 // 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) | 2551 explicit AllocateMutableHeapNumberStub(Isolate* isolate) |
2541 : TurboFanCodeStub(isolate) {} | 2552 : TurboFanCodeStub(isolate) {} |
2542 | 2553 |
2543 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; | 2554 void InitializeDescriptor(CodeStubDescriptor* descriptor) override; |
2544 void GenerateAssembly(compiler::CodeStubAssembler* assembler) const override; | 2555 void GenerateAssembly(compiler::CodeStubAssembler* assembler) const override; |
2545 | 2556 |
2546 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateMutableHeapNumber); | 2557 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateMutableHeapNumber); |
2547 DEFINE_CODE_STUB(AllocateMutableHeapNumber, TurboFanCodeStub); | 2558 DEFINE_CODE_STUB(AllocateMutableHeapNumber, TurboFanCodeStub); |
2548 }; | 2559 }; |
2549 | 2560 |
2550 | |
2551 class AllocateInNewSpaceStub final : public HydrogenCodeStub { | 2561 class AllocateInNewSpaceStub final : public HydrogenCodeStub { |
2552 public: | 2562 public: |
2553 explicit AllocateInNewSpaceStub(Isolate* isolate) | 2563 explicit AllocateInNewSpaceStub(Isolate* isolate) |
2554 : HydrogenCodeStub(isolate) {} | 2564 : HydrogenCodeStub(isolate) {} |
2555 | 2565 |
2556 private: | 2566 private: |
2557 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateInNewSpace); | 2567 DEFINE_CALL_INTERFACE_DESCRIPTOR(AllocateInNewSpace); |
2558 DEFINE_HYDROGEN_CODE_STUB(AllocateInNewSpace, HydrogenCodeStub); | 2568 DEFINE_HYDROGEN_CODE_STUB(AllocateInNewSpace, HydrogenCodeStub); |
2559 }; | 2569 }; |
2560 | 2570 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2978 #undef DEFINE_HYDROGEN_CODE_STUB | 2988 #undef DEFINE_HYDROGEN_CODE_STUB |
2979 #undef DEFINE_CODE_STUB | 2989 #undef DEFINE_CODE_STUB |
2980 #undef DEFINE_CODE_STUB_BASE | 2990 #undef DEFINE_CODE_STUB_BASE |
2981 | 2991 |
2982 extern Representation RepresentationFromType(Type* type); | 2992 extern Representation RepresentationFromType(Type* type); |
2983 | 2993 |
2984 } // namespace internal | 2994 } // namespace internal |
2985 } // namespace v8 | 2995 } // namespace v8 |
2986 | 2996 |
2987 #endif // V8_CODE_STUBS_H_ | 2997 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |