| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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_BUILTINS_BUILTINS_DESCRIPTORS_H_ | 5 #ifndef V8_BUILTINS_BUILTINS_DESCRIPTORS_H_ |
| 6 #define V8_BUILTINS_BUILTINS_DESCRIPTORS_H_ | 6 #define V8_BUILTINS_BUILTINS_DESCRIPTORS_H_ |
| 7 | 7 |
| 8 #include "src/builtins/builtins.h" | 8 #include "src/builtins/builtins.h" |
| 9 #include "src/interface-descriptors.h" | 9 #include "src/interface-descriptors.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 // Define interface descriptors for builtins with JS linkage. | 14 // Define interface descriptors for builtins with JS linkage. |
| 15 #define DEFINE_TFJ_INTERFACE_DESCRIPTOR(Name, Argc, ...) \ | 15 #define DEFINE_TFJ_INTERFACE_DESCRIPTOR(Name, Argc, ...) \ |
| 16 struct Builtin_##Name##_InterfaceDescriptor { \ | 16 struct Builtin_##Name##_InterfaceDescriptor { \ |
| 17 enum ParameterIndices { \ | 17 enum ParameterIndices { \ |
| 18 kReceiver, \ | 18 kReceiver, \ |
| 19 ##__VA_ARGS__, \ | 19 ##__VA_ARGS__, \ |
| 20 kNewTarget, \ | 20 kNewTarget, \ |
| 21 kActualArgumentsCount, \ | 21 kActualArgumentsCount, \ |
| 22 kContext, \ | 22 kContext, \ |
| 23 kParameterCount, \ | 23 kParameterCount, \ |
| 24 }; \ | 24 }; \ |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 // Define interface descriptors for builtins with StubCall linkage. | 27 // Define interface descriptors for builtins with StubCall linkage. |
| 28 #define DEFINE_TFS_INTERFACE_DESCRIPTOR(Name, InterfaceDescriptor, \ | 28 #define DEFINE_TFC_INTERFACE_DESCRIPTOR(Name, InterfaceDescriptor, \ |
| 29 result_size) \ | 29 result_size) \ |
| 30 typedef InterfaceDescriptor##Descriptor Builtin_##Name##_InterfaceDescriptor; | 30 typedef InterfaceDescriptor##Descriptor Builtin_##Name##_InterfaceDescriptor; |
| 31 | 31 |
| 32 #define DEFINE_TFS_INTERFACE_DESCRIPTOR(Name, ...) \ |
| 33 typedef Name##Descriptor Builtin_##Name##_InterfaceDescriptor; |
| 34 |
| 32 // Define interface descriptors for IC handlers/dispatchers. | 35 // Define interface descriptors for IC handlers/dispatchers. |
| 33 #define DEFINE_TFH_INTERFACE_DESCRIPTOR(Name, Kind, Extra, \ | 36 #define DEFINE_TFH_INTERFACE_DESCRIPTOR(Name, Kind, Extra, \ |
| 34 InterfaceDescriptor) \ | 37 InterfaceDescriptor) \ |
| 35 typedef InterfaceDescriptor##Descriptor Builtin_##Name##_InterfaceDescriptor; | 38 typedef InterfaceDescriptor##Descriptor Builtin_##Name##_InterfaceDescriptor; |
| 36 | 39 |
| 37 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DEFINE_TFJ_INTERFACE_DESCRIPTOR, | 40 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DEFINE_TFJ_INTERFACE_DESCRIPTOR, |
| 38 DEFINE_TFS_INTERFACE_DESCRIPTOR, DEFINE_TFH_INTERFACE_DESCRIPTOR, | 41 DEFINE_TFC_INTERFACE_DESCRIPTOR, DEFINE_TFS_INTERFACE_DESCRIPTOR, |
| 39 IGNORE_BUILTIN, IGNORE_BUILTIN) | 42 DEFINE_TFH_INTERFACE_DESCRIPTOR, IGNORE_BUILTIN, IGNORE_BUILTIN) |
| 40 | 43 |
| 41 #undef DEFINE_TFJ_INTERFACE_DESCRIPTOR | 44 #undef DEFINE_TFJ_INTERFACE_DESCRIPTOR |
| 45 #undef DEFINE_TFC_INTERFACE_DESCRIPTOR |
| 42 #undef DEFINE_TFS_INTERFACE_DESCRIPTOR | 46 #undef DEFINE_TFS_INTERFACE_DESCRIPTOR |
| 43 #undef DEFINE_TFH_INTERFACE_DESCRIPTOR | 47 #undef DEFINE_TFH_INTERFACE_DESCRIPTOR |
| 44 | 48 |
| 45 } // namespace internal | 49 } // namespace internal |
| 46 } // namespace v8 | 50 } // namespace v8 |
| 47 | 51 |
| 48 #endif // V8_BUILTINS_BUILTINS_DESCRIPTORS_H_ | 52 #endif // V8_BUILTINS_BUILTINS_DESCRIPTORS_H_ |
| OLD | NEW |