| 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 19 matching lines...) Expand all Loading... |
| 30 V(CEntry) \ | 30 V(CEntry) \ |
| 31 V(CompareIC) \ | 31 V(CompareIC) \ |
| 32 V(DoubleToI) \ | 32 V(DoubleToI) \ |
| 33 V(FunctionPrototype) \ | 33 V(FunctionPrototype) \ |
| 34 V(InstanceOf) \ | 34 V(InstanceOf) \ |
| 35 V(InternalArrayConstructor) \ | 35 V(InternalArrayConstructor) \ |
| 36 V(JSEntry) \ | 36 V(JSEntry) \ |
| 37 V(KeyedLoadICTrampoline) \ | 37 V(KeyedLoadICTrampoline) \ |
| 38 V(LoadICTrampoline) \ | 38 V(LoadICTrampoline) \ |
| 39 V(CallICTrampoline) \ | 39 V(CallICTrampoline) \ |
| 40 V(LoadIndexedInterceptor) \ | |
| 41 V(LoadIndexedString) \ | 40 V(LoadIndexedString) \ |
| 42 V(MathPow) \ | 41 V(MathPow) \ |
| 43 V(ProfileEntryHook) \ | 42 V(ProfileEntryHook) \ |
| 44 V(RecordWrite) \ | 43 V(RecordWrite) \ |
| 45 V(RegExpExec) \ | 44 V(RegExpExec) \ |
| 46 V(StoreBufferOverflow) \ | 45 V(StoreBufferOverflow) \ |
| 47 V(StoreElement) \ | 46 V(StoreElement) \ |
| 48 V(StubFailureTrampoline) \ | 47 V(StubFailureTrampoline) \ |
| 49 V(SubString) \ | 48 V(SubString) \ |
| 50 V(ToNumber) \ | 49 V(ToNumber) \ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 V(StringLessThan) \ | 111 V(StringLessThan) \ |
| 113 V(StringLessThanOrEqual) \ | 112 V(StringLessThanOrEqual) \ |
| 114 V(StringGreaterThan) \ | 113 V(StringGreaterThan) \ |
| 115 V(StringGreaterThanOrEqual) \ | 114 V(StringGreaterThanOrEqual) \ |
| 116 V(ToBoolean) \ | 115 V(ToBoolean) \ |
| 117 /* IC Handler stubs */ \ | 116 /* IC Handler stubs */ \ |
| 118 V(ArrayBufferViewLoadField) \ | 117 V(ArrayBufferViewLoadField) \ |
| 119 V(LoadConstant) \ | 118 V(LoadConstant) \ |
| 120 V(LoadFastElement) \ | 119 V(LoadFastElement) \ |
| 121 V(LoadField) \ | 120 V(LoadField) \ |
| 121 V(LoadIndexedInterceptor) \ |
| 122 V(KeyedLoadSloppyArguments) \ | 122 V(KeyedLoadSloppyArguments) \ |
| 123 V(KeyedStoreSloppyArguments) \ | 123 V(KeyedStoreSloppyArguments) \ |
| 124 V(StoreField) \ | 124 V(StoreField) \ |
| 125 V(StoreInterceptor) \ | 125 V(StoreInterceptor) \ |
| 126 V(StoreGlobal) \ | 126 V(StoreGlobal) \ |
| 127 V(StoreTransition) | 127 V(StoreTransition) |
| 128 | 128 |
| 129 // List of code stubs only used on ARM 32 bits platforms. | 129 // List of code stubs only used on ARM 32 bits platforms. |
| 130 #if V8_TARGET_ARCH_ARM | 130 #if V8_TARGET_ARCH_ARM |
| 131 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) | 131 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 }; | 771 }; |
| 772 | 772 |
| 773 class ToBooleanStub final : public TurboFanCodeStub { | 773 class ToBooleanStub final : public TurboFanCodeStub { |
| 774 public: | 774 public: |
| 775 explicit ToBooleanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 775 explicit ToBooleanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 776 | 776 |
| 777 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | 777 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); |
| 778 DEFINE_TURBOFAN_CODE_STUB(ToBoolean, TurboFanCodeStub); | 778 DEFINE_TURBOFAN_CODE_STUB(ToBoolean, TurboFanCodeStub); |
| 779 }; | 779 }; |
| 780 | 780 |
| 781 class LoadIndexedInterceptorStub : public TurboFanCodeStub { |
| 782 public: |
| 783 explicit LoadIndexedInterceptorStub(Isolate* isolate) |
| 784 : TurboFanCodeStub(isolate) {} |
| 785 |
| 786 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 787 |
| 788 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 789 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); |
| 790 }; |
| 791 |
| 781 class StoreInterceptorStub : public TurboFanCodeStub { | 792 class StoreInterceptorStub : public TurboFanCodeStub { |
| 782 public: | 793 public: |
| 783 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 794 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 784 | 795 |
| 785 void GenerateAssembly(compiler::CodeStubAssembler* assember) const override; | 796 void GenerateAssembly(compiler::CodeStubAssembler* assember) const override; |
| 786 | 797 |
| 787 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 798 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 788 | 799 |
| 789 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); | 800 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); |
| 790 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); | 801 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 // translated to a hydrogen code stub, a new CallInterfaceDescriptor | 1175 // translated to a hydrogen code stub, a new CallInterfaceDescriptor |
| 1165 // should be created that just uses that register for more efficient code. | 1176 // should be created that just uses that register for more efficient code. |
| 1166 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { | 1177 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { |
| 1167 return LoadWithVectorDescriptor(isolate()); | 1178 return LoadWithVectorDescriptor(isolate()); |
| 1168 } | 1179 } |
| 1169 | 1180 |
| 1170 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub); | 1181 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub); |
| 1171 }; | 1182 }; |
| 1172 | 1183 |
| 1173 | 1184 |
| 1174 // TODO(mvstanton): Translate to hydrogen code stub. | |
| 1175 class LoadIndexedInterceptorStub : public PlatformCodeStub { | |
| 1176 public: | |
| 1177 explicit LoadIndexedInterceptorStub(Isolate* isolate) | |
| 1178 : PlatformCodeStub(isolate) {} | |
| 1179 | |
| 1180 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | |
| 1181 Code::StubType GetStubType() const override { return Code::FAST; } | |
| 1182 | |
| 1183 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); | |
| 1184 DEFINE_PLATFORM_CODE_STUB(LoadIndexedInterceptor, PlatformCodeStub); | |
| 1185 }; | |
| 1186 | |
| 1187 | |
| 1188 class LoadIndexedStringStub : public PlatformCodeStub { | 1185 class LoadIndexedStringStub : public PlatformCodeStub { |
| 1189 public: | 1186 public: |
| 1190 explicit LoadIndexedStringStub(Isolate* isolate) | 1187 explicit LoadIndexedStringStub(Isolate* isolate) |
| 1191 : PlatformCodeStub(isolate) {} | 1188 : PlatformCodeStub(isolate) {} |
| 1192 | 1189 |
| 1193 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 1190 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 1194 Code::StubType GetStubType() const override { return Code::FAST; } | 1191 Code::StubType GetStubType() const override { return Code::FAST; } |
| 1195 | 1192 |
| 1196 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); | 1193 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); |
| 1197 DEFINE_PLATFORM_CODE_STUB(LoadIndexedString, PlatformCodeStub); | 1194 DEFINE_PLATFORM_CODE_STUB(LoadIndexedString, PlatformCodeStub); |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2990 #undef DEFINE_HYDROGEN_CODE_STUB | 2987 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2991 #undef DEFINE_CODE_STUB | 2988 #undef DEFINE_CODE_STUB |
| 2992 #undef DEFINE_CODE_STUB_BASE | 2989 #undef DEFINE_CODE_STUB_BASE |
| 2993 | 2990 |
| 2994 extern Representation RepresentationFromType(Type* type); | 2991 extern Representation RepresentationFromType(Type* type); |
| 2995 | 2992 |
| 2996 } // namespace internal | 2993 } // namespace internal |
| 2997 } // namespace v8 | 2994 } // namespace v8 |
| 2998 | 2995 |
| 2999 #endif // V8_CODE_STUBS_H_ | 2996 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |