| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_CALL_INTERFACE_DESCRIPTOR_H_ | 5 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| 6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ | 6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 V(ApiGetter) \ | 86 V(ApiGetter) \ |
| 87 V(MathPowTagged) \ | 87 V(MathPowTagged) \ |
| 88 V(MathPowInteger) \ | 88 V(MathPowInteger) \ |
| 89 V(GrowArrayElements) \ | 89 V(GrowArrayElements) \ |
| 90 V(NewArgumentsElements) \ | 90 V(NewArgumentsElements) \ |
| 91 V(InterpreterDispatch) \ | 91 V(InterpreterDispatch) \ |
| 92 V(InterpreterPushArgsAndCall) \ | 92 V(InterpreterPushArgsAndCall) \ |
| 93 V(InterpreterPushArgsAndConstruct) \ | 93 V(InterpreterPushArgsAndConstruct) \ |
| 94 V(InterpreterPushArgsAndConstructArray) \ | 94 V(InterpreterPushArgsAndConstructArray) \ |
| 95 V(InterpreterCEntry) \ | 95 V(InterpreterCEntry) \ |
| 96 V(ResumeGenerator) | 96 V(ResumeGenerator) \ |
| 97 V(PromiseHandleReject) |
| 97 | 98 |
| 98 class V8_EXPORT_PRIVATE CallInterfaceDescriptorData { | 99 class V8_EXPORT_PRIVATE CallInterfaceDescriptorData { |
| 99 public: | 100 public: |
| 100 CallInterfaceDescriptorData() : register_param_count_(-1), param_count_(-1) {} | 101 CallInterfaceDescriptorData() : register_param_count_(-1), param_count_(-1) {} |
| 101 | 102 |
| 102 // A copy of the passed in registers and param_representations is made | 103 // A copy of the passed in registers and param_representations is made |
| 103 // and owned by the CallInterfaceDescriptorData. | 104 // and owned by the CallInterfaceDescriptorData. |
| 104 | 105 |
| 105 void InitializePlatformSpecific( | 106 void InitializePlatformSpecific( |
| 106 int register_parameter_count, const Register* registers, | 107 int register_parameter_count, const Register* registers, |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 DEFINE_PARAMETERS(kNumberOfArguments, kFirstArgument, kFunctionEntry) | 828 DEFINE_PARAMETERS(kNumberOfArguments, kFirstArgument, kFunctionEntry) |
| 828 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(InterpreterCEntryDescriptor, | 829 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(InterpreterCEntryDescriptor, |
| 829 CallInterfaceDescriptor) | 830 CallInterfaceDescriptor) |
| 830 }; | 831 }; |
| 831 | 832 |
| 832 class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { | 833 class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { |
| 833 public: | 834 public: |
| 834 DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) | 835 DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) |
| 835 }; | 836 }; |
| 836 | 837 |
| 838 class PromiseHandleRejectDescriptor final : public CallInterfaceDescriptor { |
| 839 public: |
| 840 DEFINE_PARAMETERS(kPromise, kOnReject, kException) |
| 841 DECLARE_DEFAULT_DESCRIPTOR(PromiseHandleRejectDescriptor, |
| 842 CallInterfaceDescriptor, kParameterCount) |
| 843 }; |
| 844 |
| 837 #undef DECLARE_DESCRIPTOR_WITH_BASE | 845 #undef DECLARE_DESCRIPTOR_WITH_BASE |
| 838 #undef DECLARE_DESCRIPTOR | 846 #undef DECLARE_DESCRIPTOR |
| 839 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE | 847 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE |
| 840 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG | 848 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG |
| 841 #undef DEFINE_PARAMETERS | 849 #undef DEFINE_PARAMETERS |
| 842 | 850 |
| 843 // We define the association between CallDescriptors::Key and the specialized | 851 // We define the association between CallDescriptors::Key and the specialized |
| 844 // descriptor here to reduce boilerplate and mistakes. | 852 // descriptor here to reduce boilerplate and mistakes. |
| 845 #define DEF_KEY(name) \ | 853 #define DEF_KEY(name) \ |
| 846 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } | 854 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } |
| 847 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) | 855 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) |
| 848 #undef DEF_KEY | 856 #undef DEF_KEY |
| 849 } // namespace internal | 857 } // namespace internal |
| 850 } // namespace v8 | 858 } // namespace v8 |
| 851 | 859 |
| 852 | 860 |
| 853 #if V8_TARGET_ARCH_ARM64 | 861 #if V8_TARGET_ARCH_ARM64 |
| 854 #include "src/arm64/interface-descriptors-arm64.h" | 862 #include "src/arm64/interface-descriptors-arm64.h" |
| 855 #elif V8_TARGET_ARCH_ARM | 863 #elif V8_TARGET_ARCH_ARM |
| 856 #include "src/arm/interface-descriptors-arm.h" | 864 #include "src/arm/interface-descriptors-arm.h" |
| 857 #endif | 865 #endif |
| 858 | 866 |
| 859 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 867 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| OLD | NEW |