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

Unified Diff: src/interface-descriptors.h

Issue 2356163002: [stubs] Remove OnStackArgsDescriptor and friends. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « src/code-stubs.h ('k') | src/interface-descriptors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interface-descriptors.h
diff --git a/src/interface-descriptors.h b/src/interface-descriptors.h
index 8b210c84cfd8b3c96de7a70012494e418903aeda..e97a600fbe24635620719e2be6e6b29824069ec7 100644
--- a/src/interface-descriptors.h
+++ b/src/interface-descriptors.h
@@ -18,13 +18,6 @@ class PlatformInterfaceDescriptor;
#define INTERFACE_DESCRIPTOR_LIST(V) \
V(Void) \
V(ContextOnly) \
- V(OnStackWith1Args) \
- V(OnStackWith2Args) \
- V(OnStackWith3Args) \
- V(OnStackWith4Args) \
- V(OnStackWith5Args) \
- V(OnStackWith6Args) \
- V(OnStackWith7Args) \
V(Load) \
V(LoadWithVector) \
V(LoadGlobal) \
@@ -53,6 +46,7 @@ class PlatformInterfaceDescriptor;
V(CallTrampoline) \
V(ConstructStub) \
V(ConstructTrampoline) \
+ V(RegExpExec) \
V(RegExpConstructResult) \
V(CopyFastSmiOrObjectElements) \
V(TransitionElementsKind) \
@@ -77,6 +71,7 @@ class PlatformInterfaceDescriptor;
V(CountOp) \
V(StringAdd) \
V(StringCompare) \
+ V(SubString) \
V(Keyed) \
V(Named) \
V(HasProperty) \
@@ -264,11 +259,18 @@ class CallInterfaceDescriptor {
\
public:
-#define DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(name, base, arg) \
- DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
- protected: \
- int extra_args() const override { return arg; } \
- \
+#define DECLARE_DESCRIPTOR_WITH_STACK_ARGS(name, base) \
+ DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
+ protected: \
+ void InitializePlatformIndependent(CallInterfaceDescriptorData* data) \
+ override { \
+ data->InitializePlatformIndependent(0, kParameterCount, NULL); \
+ } \
+ void InitializePlatformSpecific(CallInterfaceDescriptorData* data) \
+ override { \
+ data->InitializePlatformSpecific(0, nullptr); \
+ } \
+ \
public:
#define DEFINE_PARAMETERS(...) \
@@ -289,74 +291,6 @@ class ContextOnlyDescriptor : public CallInterfaceDescriptor {
DECLARE_DESCRIPTOR(ContextOnlyDescriptor, CallInterfaceDescriptor)
};
-// The OnStackWith*ArgsDescriptors have a lot of boilerplate. The superclass
-// OnStackArgsDescriptorBase is not meant to be instantiated directly and has no
-// public constructors to ensure this is so.contains all the logic, and the
-//
-// Use OnStackArgsDescriptorBase::ForArgs(isolate, parameter_count) to
-// instantiate a descriptor with the number of args.
-class OnStackArgsDescriptorBase : public CallInterfaceDescriptor {
- public:
- static CallInterfaceDescriptor ForArgs(Isolate* isolate, int parameter_count);
-
- protected:
- virtual int extra_args() const { return 0; }
- OnStackArgsDescriptorBase(Isolate* isolate, CallDescriptors::Key key)
- : CallInterfaceDescriptor(isolate, key) {}
- void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override;
- void InitializePlatformIndependent(
- CallInterfaceDescriptorData* data) override;
-};
-
-class OnStackWith1ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith1ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 1)
-};
-
-class OnStackWith2ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith2ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 2)
-};
-
-class OnStackWith3ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith3ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 3)
-};
-
-class OnStackWith4ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith4ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 4)
-};
-
-class OnStackWith5ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith5ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 5)
-};
-
-class OnStackWith6ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith6ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 6)
-};
-
-class OnStackWith7ArgsDescriptor : public OnStackArgsDescriptorBase {
- public:
- DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG(OnStackWith7ArgsDescriptor,
- OnStackArgsDescriptorBase,
- 7)
-};
-
// LoadDescriptor is used by all stubs that implement Load/KeyedLoad ICs.
class LoadDescriptor : public CallInterfaceDescriptor {
public:
@@ -598,6 +532,12 @@ class CallConstructDescriptor : public CallInterfaceDescriptor {
DECLARE_DESCRIPTOR(CallConstructDescriptor, CallInterfaceDescriptor)
};
+class RegExpExecDescriptor : public CallInterfaceDescriptor {
+ public:
+ DEFINE_PARAMETERS(kRegExpObject, kString, kPreviousIndex, kLastMatchInfo)
+ DECLARE_DESCRIPTOR_WITH_STACK_ARGS(RegExpExecDescriptor,
+ CallInterfaceDescriptor)
+};
class RegExpConstructResultDescriptor : public CallInterfaceDescriptor {
public:
@@ -717,6 +657,13 @@ class StringCompareDescriptor : public CallInterfaceDescriptor {
static const Register RightRegister();
};
+class SubStringDescriptor : public CallInterfaceDescriptor {
+ public:
+ DEFINE_PARAMETERS(kString, kFrom, kTo)
+ DECLARE_DESCRIPTOR_WITH_STACK_ARGS(SubStringDescriptor,
+ CallInterfaceDescriptor)
+};
+
// TODO(ishell): not used, remove.
class KeyedDescriptor : public CallInterfaceDescriptor {
public:
« no previous file with comments | « src/code-stubs.h ('k') | src/interface-descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698