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

Unified Diff: src/interface-descriptors.cc

Issue 1775933005: Revert of Rework CallApi*Stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interface-descriptors.cc
diff --git a/src/interface-descriptors.cc b/src/interface-descriptors.cc
index f89fd5c13d450c6e94198e9619ae0753c74d342e..cc46a56d94a2155103aea7978c216c5b973e8166 100644
--- a/src/interface-descriptors.cc
+++ b/src/interface-descriptors.cc
@@ -494,45 +494,28 @@
return function;
}
-CallInterfaceDescriptor ApiCallbackDescriptorBase::ForArgs(Isolate* isolate,
- int argc) {
- switch (argc) {
- case 0:
- return ApiCallbackWith0ArgsDescriptor(isolate);
- case 1:
- return ApiCallbackWith1ArgsDescriptor(isolate);
- case 2:
- return ApiCallbackWith2ArgsDescriptor(isolate);
- case 3:
- return ApiCallbackWith3ArgsDescriptor(isolate);
- case 4:
- return ApiCallbackWith4ArgsDescriptor(isolate);
- case 5:
- return ApiCallbackWith5ArgsDescriptor(isolate);
- case 6:
- return ApiCallbackWith6ArgsDescriptor(isolate);
- case 7:
- return ApiCallbackWith7ArgsDescriptor(isolate);
- default:
- UNREACHABLE();
- return VoidDescriptor(isolate);
- }
-}
-
-FunctionType*
-ApiCallbackDescriptorBase::BuildCallInterfaceDescriptorFunctionTypeWithArg(
- Isolate* isolate, int parameter_count, int argc) {
- Zone* zone = isolate->interface_descriptor_zone();
- FunctionType* function =
- Type::Function(AnyTagged(zone), Type::Undefined(), 4 + argc, zone)
- ->AsFunction();
+FunctionType* ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Zone* zone = isolate->interface_descriptor_zone();
+ FunctionType* function =
+ Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction();
+ function->InitParameter(0, AnyTagged(zone)); // callee
+ function->InitParameter(1, AnyTagged(zone)); // call_data
+ function->InitParameter(2, AnyTagged(zone)); // holder
+ function->InitParameter(3, ExternalPointer(zone)); // api_function_address
+ function->InitParameter(4, UntaggedIntegral32(zone)); // actual #arguments
+ return function;
+}
+
+FunctionType* ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Zone* zone = isolate->interface_descriptor_zone();
+ FunctionType* function =
+ Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
function->InitParameter(0, AnyTagged(zone)); // callee
function->InitParameter(1, AnyTagged(zone)); // call_data
function->InitParameter(2, AnyTagged(zone)); // holder
function->InitParameter(3, ExternalPointer(zone)); // api_function_address
- for (int i = 0; i < argc; i++) {
- function->InitParameter(i, AnyTagged(zone));
- }
return function;
}
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698