| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 V(StringLessThan) \ | 113 V(StringLessThan) \ |
| 115 V(StringLessThanOrEqual) \ | 114 V(StringLessThanOrEqual) \ |
| 116 V(StringGreaterThan) \ | 115 V(StringGreaterThan) \ |
| 117 V(StringGreaterThanOrEqual) \ | 116 V(StringGreaterThanOrEqual) \ |
| 118 V(ToBoolean) \ | 117 V(ToBoolean) \ |
| 119 /* IC Handler stubs */ \ | 118 /* IC Handler stubs */ \ |
| 120 V(ArrayBufferViewLoadField) \ | 119 V(ArrayBufferViewLoadField) \ |
| 121 V(LoadConstant) \ | 120 V(LoadConstant) \ |
| 122 V(LoadFastElement) \ | 121 V(LoadFastElement) \ |
| 123 V(LoadField) \ | 122 V(LoadField) \ |
| 123 V(LoadIndexedInterceptor) \ |
| 124 V(KeyedLoadSloppyArguments) \ | 124 V(KeyedLoadSloppyArguments) \ |
| 125 V(KeyedStoreSloppyArguments) \ | 125 V(KeyedStoreSloppyArguments) \ |
| 126 V(StoreField) \ | 126 V(StoreField) \ |
| 127 V(StoreInterceptor) \ | 127 V(StoreInterceptor) \ |
| 128 V(StoreGlobal) \ | 128 V(StoreGlobal) \ |
| 129 V(StoreTransition) | 129 V(StoreTransition) |
| 130 | 130 |
| 131 // List of code stubs only used on ARM 32 bits platforms. | 131 // List of code stubs only used on ARM 32 bits platforms. |
| 132 #if V8_TARGET_ARCH_ARM | 132 #if V8_TARGET_ARCH_ARM |
| 133 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) | 133 #define CODE_STUB_LIST_ARM(V) V(DirectCEntry) |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 785 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 786 | 786 |
| 787 void GenerateAssembly(compiler::CodeStubAssembler* assember) const override; | 787 void GenerateAssembly(compiler::CodeStubAssembler* assember) const override; |
| 788 | 788 |
| 789 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 789 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 790 | 790 |
| 791 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); | 791 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); |
| 792 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); | 792 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); |
| 793 }; | 793 }; |
| 794 | 794 |
| 795 class LoadIndexedInterceptorStub : public TurboFanCodeStub { |
| 796 public: |
| 797 explicit LoadIndexedInterceptorStub(Isolate* isolate) |
| 798 : TurboFanCodeStub(isolate) {} |
| 799 |
| 800 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 801 |
| 802 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 803 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); |
| 804 }; |
| 805 |
| 795 enum StringAddFlags { | 806 enum StringAddFlags { |
| 796 // Omit both parameter checks. | 807 // Omit both parameter checks. |
| 797 STRING_ADD_CHECK_NONE = 0, | 808 STRING_ADD_CHECK_NONE = 0, |
| 798 // Check left parameter. | 809 // Check left parameter. |
| 799 STRING_ADD_CHECK_LEFT = 1 << 0, | 810 STRING_ADD_CHECK_LEFT = 1 << 0, |
| 800 // Check right parameter. | 811 // Check right parameter. |
| 801 STRING_ADD_CHECK_RIGHT = 1 << 1, | 812 STRING_ADD_CHECK_RIGHT = 1 << 1, |
| 802 // Check both parameters. | 813 // Check both parameters. |
| 803 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, | 814 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, |
| 804 // Convert parameters when check fails (instead of throwing an exception). | 815 // Convert parameters when check fails (instead of throwing an exception). |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 // translated to a hydrogen code stub, a new CallInterfaceDescriptor | 1177 // translated to a hydrogen code stub, a new CallInterfaceDescriptor |
| 1167 // should be created that just uses that register for more efficient code. | 1178 // should be created that just uses that register for more efficient code. |
| 1168 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { | 1179 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { |
| 1169 return LoadWithVectorDescriptor(isolate()); | 1180 return LoadWithVectorDescriptor(isolate()); |
| 1170 } | 1181 } |
| 1171 | 1182 |
| 1172 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub); | 1183 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub); |
| 1173 }; | 1184 }; |
| 1174 | 1185 |
| 1175 | 1186 |
| 1176 // TODO(mvstanton): Translate to hydrogen code stub. | |
| 1177 class LoadIndexedInterceptorStub : public PlatformCodeStub { | |
| 1178 public: | |
| 1179 explicit LoadIndexedInterceptorStub(Isolate* isolate) | |
| 1180 : PlatformCodeStub(isolate) {} | |
| 1181 | |
| 1182 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | |
| 1183 Code::StubType GetStubType() const override { return Code::FAST; } | |
| 1184 | |
| 1185 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); | |
| 1186 DEFINE_PLATFORM_CODE_STUB(LoadIndexedInterceptor, PlatformCodeStub); | |
| 1187 }; | |
| 1188 | |
| 1189 | |
| 1190 class LoadIndexedStringStub : public PlatformCodeStub { | 1187 class LoadIndexedStringStub : public PlatformCodeStub { |
| 1191 public: | 1188 public: |
| 1192 explicit LoadIndexedStringStub(Isolate* isolate) | 1189 explicit LoadIndexedStringStub(Isolate* isolate) |
| 1193 : PlatformCodeStub(isolate) {} | 1190 : PlatformCodeStub(isolate) {} |
| 1194 | 1191 |
| 1195 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 1192 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 1196 Code::StubType GetStubType() const override { return Code::FAST; } | 1193 Code::StubType GetStubType() const override { return Code::FAST; } |
| 1197 | 1194 |
| 1198 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); | 1195 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); |
| 1199 DEFINE_PLATFORM_CODE_STUB(LoadIndexedString, PlatformCodeStub); | 1196 DEFINE_PLATFORM_CODE_STUB(LoadIndexedString, PlatformCodeStub); |
| (...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3008 #undef DEFINE_HYDROGEN_CODE_STUB | 3005 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3009 #undef DEFINE_CODE_STUB | 3006 #undef DEFINE_CODE_STUB |
| 3010 #undef DEFINE_CODE_STUB_BASE | 3007 #undef DEFINE_CODE_STUB_BASE |
| 3011 | 3008 |
| 3012 extern Representation RepresentationFromType(Type* type); | 3009 extern Representation RepresentationFromType(Type* type); |
| 3013 | 3010 |
| 3014 } // namespace internal | 3011 } // namespace internal |
| 3015 } // namespace v8 | 3012 } // namespace v8 |
| 3016 | 3013 |
| 3017 #endif // V8_CODE_STUBS_H_ | 3014 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |