Index: src/interface-descriptors.h |
diff --git a/src/interface-descriptors.h b/src/interface-descriptors.h |
index b7c6c9db8450818000bed40c80726d8a15284fca..3239a55f5f367bbb9045f30c95f0a52402eefa19 100644 |
--- a/src/interface-descriptors.h |
+++ b/src/interface-descriptors.h |
@@ -109,7 +109,7 @@ class CallInterfaceDescriptorData { |
// and register side by side (eg, RegRep(r1, Representation::Tagged()). |
// The same should go for the CodeStubDescriptor class. |
void InitializePlatformSpecific( |
- int register_parameter_count, Register* registers, |
+ int register_parameter_count, const Register* registers, |
PlatformInterfaceDescriptor* platform_descriptor = NULL); |
bool IsInitialized() const { return register_param_count_ >= 0; } |
@@ -218,6 +218,12 @@ class CallInterfaceDescriptor { |
} |
} |
+ // Initializes |data| using the platform dependent default set of registers. |
+ // It is intended to be used for TurboFan stubs when particular set of |
+ // registers does not matter. |
+ static void DefaultInitializePlatformSpecific( |
+ CallInterfaceDescriptorData* data, int register_parameter_count); |
+ |
private: |
const CallInterfaceDescriptorData* data_; |
}; |
@@ -229,6 +235,17 @@ class CallInterfaceDescriptor { |
} \ |
static inline CallDescriptors::Key key(); |
+#define DECLARE_DEFAULT_DESCRIPTOR(name, base, parameter_count) \ |
+ DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ |
+ protected: \ |
+ void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \ |
+ override { \ |
+ DefaultInitializePlatformSpecific(data, parameter_count); \ |
+ } \ |
+ name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \ |
+ \ |
+ public: |
+ |
#define DECLARE_DESCRIPTOR(name, base) \ |
DECLARE_DESCRIPTOR_WITH_BASE(name, base) \ |
protected: \ |
@@ -424,10 +441,7 @@ class HasPropertyDescriptor final : public CallInterfaceDescriptor { |
public: |
enum ParameterIndices { kKeyIndex, kObjectIndex }; |
- DECLARE_DESCRIPTOR(HasPropertyDescriptor, CallInterfaceDescriptor) |
- |
- static const Register KeyRegister(); |
- static const Register ObjectRegister(); |
+ DECLARE_DEFAULT_DESCRIPTOR(HasPropertyDescriptor, CallInterfaceDescriptor, 2) |
}; |
class TypeofDescriptor : public CallInterfaceDescriptor { |