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

Unified Diff: src/code-stubs.h

Issue 2051573002: [Interpreter] Add intrinsics called as stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix leak Created 4 years, 6 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-factory.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index de619579eee0059279d9263418cba9e830168ccb..85b0883db849033869eae4c5df248d9f907d7c83 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -434,6 +434,12 @@ class CodeStub BASE_EMBEDDED {
return NAME##Descriptor(isolate()); \
}
+#define DEFINE_ON_STACK_CALL_INTERFACE_DESCRIPTOR(PARAMETER_COUNT) \
+ public: \
+ CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \
+ return OnStackArgsDescriptorBase::ForArgs(isolate(), PARAMETER_COUNT); \
+ }
+
// There are some code stubs we just can't describe right now with a
// CallInterfaceDescriptor. Isolate behavior for those cases with this macro.
// An attempt to retrieve a descriptor will fail.
@@ -1328,13 +1334,17 @@ class MathPowStub: public PlatformCodeStub {
}
CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
- if (exponent_type() == TAGGED) {
+ if (exponent_type() == ON_STACK) {
+ return OnStackArgsDescriptorBase::ForArgs(isolate(), 2);
+ } else if (exponent_type() == TAGGED) {
return MathPowTaggedDescriptor(isolate());
} else if (exponent_type() == INTEGER) {
return MathPowIntegerDescriptor(isolate());
+ } else {
+ // A CallInterfaceDescriptor doesn't specify double registers (yet).
+ DCHECK_EQ(DOUBLE, exponent_type());
+ return ContextOnlyDescriptor(isolate());
}
- // A CallInterfaceDescriptor doesn't specify double registers (yet).
- return ContextOnlyDescriptor(isolate());
}
private:
@@ -2083,7 +2093,7 @@ class RegExpExecStub: public PlatformCodeStub {
public:
explicit RegExpExecStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
- DEFINE_CALL_INTERFACE_DESCRIPTOR(ContextOnly);
+ DEFINE_ON_STACK_CALL_INTERFACE_DESCRIPTOR(4);
DEFINE_PLATFORM_CODE_STUB(RegExpExec, PlatformCodeStub);
};
@@ -3068,7 +3078,7 @@ class SubStringStub : public PlatformCodeStub {
public:
explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
- DEFINE_CALL_INTERFACE_DESCRIPTOR(ContextOnly);
+ DEFINE_ON_STACK_CALL_INTERFACE_DESCRIPTOR(3);
DEFINE_PLATFORM_CODE_STUB(SubString, PlatformCodeStub);
};
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698