Commit 1834bbf7 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Remove unneeded argument to DECLARE_DEFAULT_DESCRIPTOR

The {parameter_count} is always equal to {kParameterCount}, so just use
{kParameterCount} directly.

R=ishell@chromium.org

Bug: v8:7754
Change-Id: I136387b5f2da3af10bb36215f947ff0e0d872928
Reviewed-on: https://chromium-review.googlesource.com/1109820Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53916}
parent 4d93fae9
...@@ -268,20 +268,20 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor { ...@@ -268,20 +268,20 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
constexpr int kMaxBuiltinRegisterParams = 5; constexpr int kMaxBuiltinRegisterParams = 5;
#define DECLARE_DEFAULT_DESCRIPTOR(name, base, parameter_count) \ #define DECLARE_DEFAULT_DESCRIPTOR(name, base) \
DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
protected: \ protected: \
static const int kRegisterParams = \ static const int kRegisterParams = \
parameter_count > kMaxBuiltinRegisterParams ? kMaxBuiltinRegisterParams \ kParameterCount > kMaxBuiltinRegisterParams ? kMaxBuiltinRegisterParams \
: parameter_count; \ : kParameterCount; \
static const int kStackParams = parameter_count - kRegisterParams; \ static const int kStackParams = kParameterCount - kRegisterParams; \
void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \ void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \
override { \ override { \
DefaultInitializePlatformSpecific(data, kRegisterParams); \ DefaultInitializePlatformSpecific(data, kRegisterParams); \
} \ } \
void InitializePlatformIndependent(CallInterfaceDescriptorData* data) \ void InitializePlatformIndependent(CallInterfaceDescriptorData* data) \
override { \ override { \
data->InitializePlatformIndependent(kReturnCount, parameter_count, \ data->InitializePlatformIndependent(kReturnCount, kParameterCount, \
nullptr, 0); \ nullptr, 0); \
} \ } \
name(CallDescriptors::Key key) : base(key) {} \ name(CallDescriptors::Key key) : base(key) {} \
...@@ -608,8 +608,7 @@ class TypeConversionStackParameterDescriptor final ...@@ -608,8 +608,7 @@ class TypeConversionStackParameterDescriptor final
class GetPropertyDescriptor final : public CallInterfaceDescriptor { class GetPropertyDescriptor final : public CallInterfaceDescriptor {
public: public:
DEFINE_PARAMETERS(kObject, kKey) DEFINE_PARAMETERS(kObject, kKey)
DECLARE_DEFAULT_DESCRIPTOR(GetPropertyDescriptor, CallInterfaceDescriptor, DECLARE_DEFAULT_DESCRIPTOR(GetPropertyDescriptor, CallInterfaceDescriptor)
kParameterCount)
}; };
class TypeofDescriptor : public CallInterfaceDescriptor { class TypeofDescriptor : public CallInterfaceDescriptor {
...@@ -946,16 +945,14 @@ class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor { ...@@ -946,16 +945,14 @@ class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor {
class RunMicrotasksDescriptor final : public CallInterfaceDescriptor { class RunMicrotasksDescriptor final : public CallInterfaceDescriptor {
public: public:
DEFINE_PARAMETERS() DEFINE_PARAMETERS()
DECLARE_DEFAULT_DESCRIPTOR(RunMicrotasksDescriptor, CallInterfaceDescriptor, DECLARE_DEFAULT_DESCRIPTOR(RunMicrotasksDescriptor, CallInterfaceDescriptor)
0)
}; };
#define DEFINE_TFS_BUILTIN_DESCRIPTOR(Name, ...) \ #define DEFINE_TFS_BUILTIN_DESCRIPTOR(Name, ...) \
class Name##Descriptor : public CallInterfaceDescriptor { \ class Name##Descriptor : public CallInterfaceDescriptor { \
public: \ public: \
DEFINE_PARAMETERS(__VA_ARGS__) \ DEFINE_PARAMETERS(__VA_ARGS__) \
DECLARE_DEFAULT_DESCRIPTOR(Name##Descriptor, CallInterfaceDescriptor, \ DECLARE_DEFAULT_DESCRIPTOR(Name##Descriptor, CallInterfaceDescriptor) \
kParameterCount) \
}; };
BUILTIN_LIST_TFS(DEFINE_TFS_BUILTIN_DESCRIPTOR) BUILTIN_LIST_TFS(DEFINE_TFS_BUILTIN_DESCRIPTOR)
#undef DEFINE_TFS_BUILTIN_DESCRIPTOR #undef DEFINE_TFS_BUILTIN_DESCRIPTOR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment