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

Unified Diff: src/fast-accessor-assembler.cc

Issue 2143983002: Fix context for fast accessors (lazy). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-accessor-assembler.cc
diff --git a/src/fast-accessor-assembler.cc b/src/fast-accessor-assembler.cc
index fa97b923eb6423e019f65058d428a00e9b4c307c..a261eb01a63a5edfbd3a311b963cac30b1bc464d 100644
--- a/src/fast-accessor-assembler.cc
+++ b/src/fast-accessor-assembler.cc
@@ -168,23 +168,23 @@ FastAccessorAssembler::ValueId FastAccessorAssembler::Call(
ExternalReference::DIRECT_API_CALL, isolate());
// Create & call API callback via stub.
- CallApiCallbackStub stub(isolate(), 1, true);
+ CallApiCallbackStub stub(isolate(), 1, true, true);
DCHECK_EQ(5, stub.GetCallInterfaceDescriptor().GetParameterCount());
DCHECK_EQ(1, stub.GetCallInterfaceDescriptor().GetStackParameterCount());
// TODO(vogelheim): There is currently no clean way to retrieve the context
// parameter for a stub and the implementation details are hidden in
// compiler/*. The context_paramter is computed as:
// Linkage::GetJSCallContextParamIndex(descriptor->JSParameterCount())
- const int context_parameter = 2;
+ const int context_parameter = 3;
Node* call = assembler_->CallStub(
stub.GetCallInterfaceDescriptor(),
assembler_->HeapConstant(stub.GetCode()),
assembler_->Parameter(context_parameter),
// Stub/register parameters:
- assembler_->Parameter(0), /* receiver (use accessor's) */
- assembler_->UndefinedConstant(), /* call_data (undefined) */
- assembler_->NullConstant(), /* holder (null) */
+ assembler_->UndefinedConstant(), /* callee (there's no JSFunction) */
+ assembler_->UndefinedConstant(), /* call_data (undefined) */
+ assembler_->Parameter(0), /* receiver (same as holder in this case) */
assembler_->ExternalConstant(callback), /* API callback function */
// JS arguments, on stack:
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698