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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 1609233002: Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 5661 matching lines...) Expand 10 before | Expand all | Expand 10 after
5672 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate), 5672 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate),
5673 1); 5673 1);
5674 __ Mov(x0, saved_result); 5674 __ Mov(x0, saved_result);
5675 __ B(&leave_exit_frame); 5675 __ B(&leave_exit_frame);
5676 } 5676 }
5677 5677
5678 5678
5679 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5679 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5680 const ParameterCount& argc, 5680 const ParameterCount& argc,
5681 bool return_first_arg, 5681 bool return_first_arg,
5682 bool call_data_undefined) { 5682 bool call_data_undefined, bool is_lazy) {
5683 // ----------- S t a t e ------------- 5683 // ----------- S t a t e -------------
5684 // -- x0 : callee 5684 // -- x0 : callee
5685 // -- x4 : call_data 5685 // -- x4 : call_data
5686 // -- x2 : holder 5686 // -- x2 : holder
5687 // -- x1 : api_function_address 5687 // -- x1 : api_function_address
5688 // -- x3 : number of arguments if argc is a register 5688 // -- x3 : number of arguments if argc is a register
5689 // -- cp : context 5689 // -- cp : context
5690 // -- 5690 // --
5691 // -- sp[0] : last argument 5691 // -- sp[0] : last argument
5692 // -- ... 5692 // -- ...
(...skipping 16 matching lines...) Expand all
5709 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5709 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5710 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5710 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5711 STATIC_ASSERT(FCA::kHolderIndex == 0); 5711 STATIC_ASSERT(FCA::kHolderIndex == 0);
5712 STATIC_ASSERT(FCA::kArgsLength == 7); 5712 STATIC_ASSERT(FCA::kArgsLength == 7);
5713 5713
5714 DCHECK(argc.is_immediate() || x3.is(argc.reg())); 5714 DCHECK(argc.is_immediate() || x3.is(argc.reg()));
5715 5715
5716 // FunctionCallbackArguments: context, callee and call data. 5716 // FunctionCallbackArguments: context, callee and call data.
5717 __ Push(context, callee, call_data); 5717 __ Push(context, callee, call_data);
5718 5718
5719 // Load context from callee 5719 if (!is_lazy) {
5720 __ Ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset)); 5720 // Load context from callee
5721 __ Ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5722 }
5721 5723
5722 if (!call_data_undefined) { 5724 if (!call_data_undefined) {
5723 __ LoadRoot(call_data, Heap::kUndefinedValueRootIndex); 5725 __ LoadRoot(call_data, Heap::kUndefinedValueRootIndex);
5724 } 5726 }
5725 Register isolate_reg = x5; 5727 Register isolate_reg = x5;
5726 __ Mov(isolate_reg, ExternalReference::isolate_address(masm->isolate())); 5728 __ Mov(isolate_reg, ExternalReference::isolate_address(masm->isolate()));
5727 5729
5728 // FunctionCallbackArguments: 5730 // FunctionCallbackArguments:
5729 // return value, return value default, isolate, holder. 5731 // return value, return value default, isolate, holder.
5730 __ Push(call_data, call_data, isolate_reg, holder); 5732 __ Push(call_data, call_data, isolate_reg, holder);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
5795 const int spill_offset = 1 + kApiStackSpace; 5797 const int spill_offset = 1 + kApiStackSpace;
5796 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space, 5798 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
5797 stack_space_operand, spill_offset, 5799 stack_space_operand, spill_offset,
5798 return_value_operand, &context_restore_operand); 5800 return_value_operand, &context_restore_operand);
5799 } 5801 }
5800 5802
5801 5803
5802 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5804 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5803 bool call_data_undefined = this->call_data_undefined(); 5805 bool call_data_undefined = this->call_data_undefined();
5804 CallApiFunctionStubHelper(masm, ParameterCount(x3), false, 5806 CallApiFunctionStubHelper(masm, ParameterCount(x3), false,
5805 call_data_undefined); 5807 call_data_undefined, false);
5806 } 5808 }
5807 5809
5808 5810
5809 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5811 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5810 bool is_store = this->is_store(); 5812 bool is_store = this->is_store();
5811 int argc = this->argc(); 5813 int argc = this->argc();
5812 bool call_data_undefined = this->call_data_undefined(); 5814 bool call_data_undefined = this->call_data_undefined();
5815 bool is_lazy = this->is_lazy();
5813 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5816 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5814 call_data_undefined); 5817 call_data_undefined, is_lazy);
5815 } 5818 }
5816 5819
5817 5820
5818 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5821 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5819 // ----------- S t a t e ------------- 5822 // ----------- S t a t e -------------
5820 // -- sp[0] : name 5823 // -- sp[0] : name
5821 // -- sp[8 - kArgsLength*8] : PropertyCallbackArguments object 5824 // -- sp[8 - kArgsLength*8] : PropertyCallbackArguments object
5822 // -- ... 5825 // -- ...
5823 // -- x2 : api_function_address 5826 // -- x2 : api_function_address
5824 // ----------------------------------- 5827 // -----------------------------------
(...skipping 29 matching lines...) Expand all
5854 MemOperand(fp, 6 * kPointerSize), NULL); 5857 MemOperand(fp, 6 * kPointerSize), NULL);
5855 } 5858 }
5856 5859
5857 5860
5858 #undef __ 5861 #undef __
5859 5862
5860 } // namespace internal 5863 } // namespace internal
5861 } // namespace v8 5864 } // namespace v8
5862 5865
5863 #endif // V8_TARGET_ARCH_ARM64 5866 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698