Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Unified Diff: src/interface-descriptors.h

Issue 2829093004: [turbofan] Avoid going through ArgumentsAdaptorTrampoline for CSA/C++ builtins (Closed)
Patch Set: Merge with ToT Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interface-descriptors.h
diff --git a/src/interface-descriptors.h b/src/interface-descriptors.h
index 4a42862afa0b678969684db02a849b7683271abf..461782e75fde46ee1b232cdc3982aaee81aed812 100644
--- a/src/interface-descriptors.h
+++ b/src/interface-descriptors.h
@@ -226,15 +226,25 @@ class V8_EXPORT_PRIVATE 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) {} \
- \
+static const int kMaxBuiltinRegisterParams = 5;
+
+#define DECLARE_DEFAULT_DESCRIPTOR(name, base, parameter_count) \
+ DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
+ protected: \
+ static const int kRegisterParams = \
+ parameter_count > kMaxBuiltinRegisterParams ? kMaxBuiltinRegisterParams \
+ : parameter_count; \
+ static const int kStackParams = parameter_count - kRegisterParams; \
+ void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \
+ override { \
+ DefaultInitializePlatformSpecific(data, kRegisterParams); \
+ } \
+ void InitializePlatformIndependent(CallInterfaceDescriptorData* data) \
+ override { \
+ data->InitializePlatformIndependent(kRegisterParams, kStackParams, NULL); \
+ } \
+ name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \
+ \
public:
#define DECLARE_DESCRIPTOR(name, base) \
@@ -643,11 +653,12 @@ class IteratingArrayBuiltinDescriptor : public BuiltinDescriptor {
};
class IteratingArrayBuiltinLoopContinuationDescriptor
- : public BuiltinDescriptor {
+ : public CallInterfaceDescriptor {
public:
- DEFINE_BUILTIN_PARAMETERS(kCallback, kThisArg, kArray, kObject, kInitialK,
- kLength, kTo)
- DECLARE_BUILTIN_DESCRIPTOR(IteratingArrayBuiltinLoopContinuationDescriptor)
+ DEFINE_PARAMETERS(kReceiver, kCallback, kThisArg, kArray, kObject, kInitialK,
Igor Sheludko 2017/04/27 10:38:05 While you are here, please fix all the builtins th
danno 2017/04/28 06:58:10 Done.
+ kLength, kTo)
+ DECLARE_DEFAULT_DESCRIPTOR(IteratingArrayBuiltinLoopContinuationDescriptor,
+ CallInterfaceDescriptor, kParameterCount)
};
class ArrayConstructorDescriptor : public CallInterfaceDescriptor {

Powered by Google App Engine
This is Rietveld 408576698