OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5305 __ Add(x0, masm->StackPointer(), 1 * kPointerSize); | 5305 __ Add(x0, masm->StackPointer(), 1 * kPointerSize); |
5306 // FunctionCallbackInfo::implicit_args_ and FunctionCallbackInfo::values_ | 5306 // FunctionCallbackInfo::implicit_args_ and FunctionCallbackInfo::values_ |
5307 __ Add(x10, args, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize)); | 5307 __ Add(x10, args, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize)); |
5308 __ Stp(args, x10, MemOperand(x0, 0 * kPointerSize)); | 5308 __ Stp(args, x10, MemOperand(x0, 0 * kPointerSize)); |
5309 // FunctionCallbackInfo::length_ = argc and | 5309 // FunctionCallbackInfo::length_ = argc and |
5310 // FunctionCallbackInfo::is_construct_call = 0 | 5310 // FunctionCallbackInfo::is_construct_call = 0 |
5311 __ Mov(x10, argc); | 5311 __ Mov(x10, argc); |
5312 __ Stp(x10, xzr, MemOperand(x0, 2 * kPointerSize)); | 5312 __ Stp(x10, xzr, MemOperand(x0, 2 * kPointerSize)); |
5313 | 5313 |
5314 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; | 5314 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; |
5315 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); | 5315 ExternalReference thunk_ref = |
5316 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; | 5316 ExternalReference::invoke_function_callback(isolate()); |
5317 ApiFunction thunk_fun(thunk_address); | |
5318 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, | |
5319 isolate()); | |
5320 | 5317 |
5321 AllowExternalCallThatCantCauseGC scope(masm); | 5318 AllowExternalCallThatCantCauseGC scope(masm); |
5322 MemOperand context_restore_operand( | 5319 MemOperand context_restore_operand( |
5323 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); | 5320 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); |
5324 // Stores return the first js argument | 5321 // Stores return the first js argument |
5325 int return_value_offset = 0; | 5322 int return_value_offset = 0; |
5326 if (is_store) { | 5323 if (is_store) { |
5327 return_value_offset = 2 + FCA::kArgsLength; | 5324 return_value_offset = 2 + FCA::kArgsLength; |
5328 } else { | 5325 } else { |
5329 return_value_offset = 2 + FCA::kReturnValueOffset; | 5326 return_value_offset = 2 + FCA::kReturnValueOffset; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5362 FrameScope frame_scope(masm, StackFrame::MANUAL); | 5359 FrameScope frame_scope(masm, StackFrame::MANUAL); |
5363 __ EnterExitFrame(false, x10, kApiStackSpace + kCallApiFunctionSpillSpace); | 5360 __ EnterExitFrame(false, x10, kApiStackSpace + kCallApiFunctionSpillSpace); |
5364 | 5361 |
5365 // Create PropertyAccessorInfo instance on the stack above the exit frame with | 5362 // Create PropertyAccessorInfo instance on the stack above the exit frame with |
5366 // x1 (internal::Object** args_) as the data. | 5363 // x1 (internal::Object** args_) as the data. |
5367 __ Poke(x1, 1 * kPointerSize); | 5364 __ Poke(x1, 1 * kPointerSize); |
5368 __ Add(x1, masm->StackPointer(), 1 * kPointerSize); // x1 = AccessorInfo& | 5365 __ Add(x1, masm->StackPointer(), 1 * kPointerSize); // x1 = AccessorInfo& |
5369 | 5366 |
5370 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; | 5367 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; |
5371 | 5368 |
5372 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); | 5369 ExternalReference thunk_ref = |
5373 ExternalReference::Type thunk_type = | 5370 ExternalReference::invoke_accessor_getter_callback(isolate()); |
5374 ExternalReference::PROFILING_GETTER_CALL; | |
5375 ApiFunction thunk_fun(thunk_address); | |
5376 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, | |
5377 isolate()); | |
5378 | 5371 |
5379 const int spill_offset = 1 + kApiStackSpace; | 5372 const int spill_offset = 1 + kApiStackSpace; |
5380 __ CallApiFunctionAndReturn(api_function_address, | 5373 __ CallApiFunctionAndReturn(api_function_address, |
5381 thunk_ref, | 5374 thunk_ref, |
5382 kStackUnwindSpace, | 5375 kStackUnwindSpace, |
5383 spill_offset, | 5376 spill_offset, |
5384 MemOperand(fp, 6 * kPointerSize), | 5377 MemOperand(fp, 6 * kPointerSize), |
5385 NULL); | 5378 NULL); |
5386 } | 5379 } |
5387 | 5380 |
5388 | 5381 |
5389 #undef __ | 5382 #undef __ |
5390 | 5383 |
5391 } } // namespace v8::internal | 5384 } } // namespace v8::internal |
5392 | 5385 |
5393 #endif // V8_TARGET_ARCH_ARM64 | 5386 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |