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 77 matching lines...) Loading... |
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(FrameDropperTrampoline) \ | 97 V(FrameDropperTrampoline) \ |
98 V(PromiseHandleReject) | 98 V(PromiseHandleReject) \ |
| 99 V(WasmStackGuard) |
99 | 100 |
100 class V8_EXPORT_PRIVATE CallInterfaceDescriptorData { | 101 class V8_EXPORT_PRIVATE CallInterfaceDescriptorData { |
101 public: | 102 public: |
102 CallInterfaceDescriptorData() : register_param_count_(-1), param_count_(-1) {} | 103 CallInterfaceDescriptorData() : register_param_count_(-1), param_count_(-1) {} |
103 | 104 |
104 // A copy of the passed in registers and param_representations is made | 105 // A copy of the passed in registers and param_representations is made |
105 // and owned by the CallInterfaceDescriptorData. | 106 // and owned by the CallInterfaceDescriptorData. |
106 | 107 |
107 void InitializePlatformSpecific( | 108 void InitializePlatformSpecific( |
108 int register_parameter_count, const Register* registers, | 109 int register_parameter_count, const Register* registers, |
(...skipping 836 matching lines...) Loading... |
945 CallInterfaceDescriptor) | 946 CallInterfaceDescriptor) |
946 }; | 947 }; |
947 | 948 |
948 class PromiseHandleRejectDescriptor final : public CallInterfaceDescriptor { | 949 class PromiseHandleRejectDescriptor final : public CallInterfaceDescriptor { |
949 public: | 950 public: |
950 DEFINE_PARAMETERS(kPromise, kOnReject, kException) | 951 DEFINE_PARAMETERS(kPromise, kOnReject, kException) |
951 DECLARE_DEFAULT_DESCRIPTOR(PromiseHandleRejectDescriptor, | 952 DECLARE_DEFAULT_DESCRIPTOR(PromiseHandleRejectDescriptor, |
952 CallInterfaceDescriptor, kParameterCount) | 953 CallInterfaceDescriptor, kParameterCount) |
953 }; | 954 }; |
954 | 955 |
| 956 class WasmStackGuardDescriptor final : public CallInterfaceDescriptor { |
| 957 public: |
| 958 DECLARE_DEFAULT_DESCRIPTOR(WasmStackGuardDescriptor, CallInterfaceDescriptor, |
| 959 0) |
| 960 }; |
| 961 |
955 #undef DECLARE_DESCRIPTOR_WITH_BASE | 962 #undef DECLARE_DESCRIPTOR_WITH_BASE |
956 #undef DECLARE_DESCRIPTOR | 963 #undef DECLARE_DESCRIPTOR |
957 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE | 964 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE |
958 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG | 965 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG |
959 #undef DEFINE_PARAMETERS | 966 #undef DEFINE_PARAMETERS |
960 | 967 |
961 // We define the association between CallDescriptors::Key and the specialized | 968 // We define the association between CallDescriptors::Key and the specialized |
962 // descriptor here to reduce boilerplate and mistakes. | 969 // descriptor here to reduce boilerplate and mistakes. |
963 #define DEF_KEY(name) \ | 970 #define DEF_KEY(name) \ |
964 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } | 971 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } |
965 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) | 972 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) |
966 #undef DEF_KEY | 973 #undef DEF_KEY |
967 } // namespace internal | 974 } // namespace internal |
968 } // namespace v8 | 975 } // namespace v8 |
969 | 976 |
970 | 977 |
971 #if V8_TARGET_ARCH_ARM64 | 978 #if V8_TARGET_ARCH_ARM64 |
972 #include "src/arm64/interface-descriptors-arm64.h" | 979 #include "src/arm64/interface-descriptors-arm64.h" |
973 #elif V8_TARGET_ARCH_ARM | 980 #elif V8_TARGET_ARCH_ARM |
974 #include "src/arm/interface-descriptors-arm.h" | 981 #include "src/arm/interface-descriptors-arm.h" |
975 #endif | 982 #endif |
976 | 983 |
977 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 984 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
OLD | NEW |