Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 55e4a9b129556c070cfc8a3e39b1d9f6bc777864..7e8e511293ec2cf080b9fab0d06560f89e298e8e 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1191,7 +1191,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
Handle<JSObject> holder, |
Handle<Name> name, |
Label* success, |
- Handle<ExecutableAccessorInfo> callback) { |
+ Handle<Object> callback) { |
Label miss; |
Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); |
@@ -1276,6 +1276,29 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg, |
void BaseLoadStubCompiler::GenerateLoadCallback( |
+ const CallOptimization& call_optimization) { |
+ ASSERT(call_optimization.is_simple_api_call()); |
+ |
+ // Copy return value. |
+ __ movq(scratch3(), StackSpaceOperand(0)); |
+ // Assign stack space for the call arguments. |
+ __ subq(rsp, Immediate((kFastApiCallArguments + 1) * kPointerSize)); |
+ // Move the return address on top of the stack. |
+ __ movq(StackOperandForReturnAddress(0), scratch3()); |
+ |
+ int argc = 0; |
+ int api_call_argc = argc + kFastApiCallArguments; |
+ StackArgumentsAccessor args(rsp, api_call_argc); |
+ // Write holder to stack frame. |
+ __ movq(args.GetArgumentOperand(api_call_argc), receiver()); |
+ // Write receiver to stack frame. |
+ __ movq(args.GetArgumentOperand(api_call_argc - (argc + 6)), receiver()); |
+ |
+ GenerateFastApiCall(masm(), call_optimization, argc); |
+} |
+ |
+ |
+void BaseLoadStubCompiler::GenerateLoadCallback( |
Register reg, |
Handle<ExecutableAccessorInfo> callback) { |
// Insert additional parameters into the stack frame above return address. |