| Index: src/ic/x64/handler-compiler-x64.cc
|
| diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc
|
| index a782b088edda0d7e4c222256674749e9951c6b69..ead4067313a5bb8aac43d9d61b9c255ed4ec5fc2 100644
|
| --- a/src/ic/x64/handler-compiler-x64.cc
|
| +++ b/src/ic/x64/handler-compiler-x64.cc
|
| @@ -508,6 +508,8 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
|
| STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
|
| STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
|
| STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6);
|
| +
|
| + bool fast_call = callback->can_fast_call();
|
| __ Push(receiver()); // receiver
|
| if (heap()->InNewSpace(callback->data())) {
|
| DCHECK(!scratch2().is(reg));
|
| @@ -523,6 +525,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
|
| __ Push(kScratchRegister); // return value default
|
| __ PushAddress(ExternalReference::isolate_address(isolate()));
|
| __ Push(reg); // holder
|
| + if (fast_call) {
|
| + // the address of PropertyCallbackInfo
|
| + __ leap(kScratchRegister, Operand(rsp, 0));
|
| + __ Push(kScratchRegister);
|
| + }
|
| __ Push(name()); // name
|
| // Save a pointer to where we pushed the arguments pointer. This will be
|
| // passed as the const PropertyAccessorInfo& to the C++ callback.
|
| @@ -533,6 +540,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
|
| Register api_function_address = ApiGetterDescriptor::function_address();
|
| Address getter_address = v8::ToCData<Address>(callback->getter());
|
| __ Move(api_function_address, getter_address, RelocInfo::EXTERNAL_REFERENCE);
|
| + if (fast_call) {
|
| + CallFastApiGetterStub stub(isolate());
|
| + __ TailCallStub(&stub);
|
| + return;
|
| + }
|
|
|
| CallApiGetterStub stub(isolate());
|
| __ TailCallStub(&stub);
|
|
|