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

Unified Diff: src/compiler/fast-accessor-assembler.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/code-stubs.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/fast-accessor-assembler.cc
diff --git a/src/compiler/fast-accessor-assembler.cc b/src/compiler/fast-accessor-assembler.cc
index 1a97fd5337e6cc6aa9af729cb94a3bdb1f056b8e..518003b2eedb0d8885b27bd599dd6fb63e74ae71 100644
--- a/src/compiler/fast-accessor-assembler.cc
+++ b/src/compiler/fast-accessor-assembler.cc
@@ -5,7 +5,7 @@
#include "src/compiler/fast-accessor-assembler.h"
#include "src/base/logging.h"
-#include "src/code-stubs.h" // For CallApiCallbackStub.
+#include "src/code-stubs.h" // For CallApiFunctionStub.
#include "src/compiler/graph.h"
#include "src/compiler/linkage.h"
#include "src/compiler/pipeline.h"
@@ -172,8 +172,7 @@
CHECK_EQ(kBuilding, state_);
// Create API function stub.
- CallApiCallbackStub stub(assembler_->isolate(), 1, true);
- DCHECK_EQ(1, stub.GetCallInterfaceDescriptor().GetStackParameterCount());
+ CallApiFunctionStub stub(assembler_->isolate(), true);
// Wrap the FunctionCallback in an ExternalReference.
ApiFunction callback_api_function(FUNCTION_ADDR(callback_function));
@@ -181,27 +180,30 @@
ExternalReference::DIRECT_API_CALL,
assembler_->isolate());
- // The stub has 6 parameters.
- // See: ApiCallbackDescriptorBase::BuildCallInterfaceDescriptorFunctionType
+ // The stub has 5 parameters, and kJSParam (here: 1) parameters to pass
+ // through to the callback.
+ // See: ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType
+ static const int kStackParam = 1;
Node* args[] = {
// Stub/register parameters:
- assembler_->Parameter(0), /* receiver (use accessor's) */
- assembler_->UndefinedConstant(), /* call_data (undefined) */
- assembler_->NullConstant(), /* holder (null) */
- assembler_->ExternalConstant(callback), /* API callback function */
-
- // JS arguments, on stack:
+ assembler_->Parameter(0), /* receiver (use accessor's) */
+ assembler_->UndefinedConstant(), /* call_data (undefined) */
+ assembler_->NullConstant(), /* holder (null) */
+ assembler_->ExternalConstant(callback), /* API callback function */
+ assembler_->IntPtrConstant(kStackParam), /* # JS arguments */
+
+ // kStackParam stack parameter(s):
FromId(arg),
// Context parameter. (See Linkage::GetStubCallDescriptor.)
assembler_->UndefinedConstant()};
- DCHECK_EQ(arraysize(args),
- 1 + stub.GetCallInterfaceDescriptor().GetParameterCount());
+ CHECK_EQ(5 + kStackParam + 1, arraysize(args));
Node* call = assembler_->CallN(
Linkage::GetStubCallDescriptor(
assembler_->isolate(), zone(), stub.GetCallInterfaceDescriptor(),
- stub.GetStackParameterCount(), CallDescriptor::kNoFlags),
+ kStackParam + stub.GetStackParameterCount(),
+ CallDescriptor::kNoFlags),
assembler_->HeapConstant(stub.GetCode()), args);
return FromRaw(call);
}
« no previous file with comments | « src/code-stubs.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698