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

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

Issue 1609233002: Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make GCMole happy again. Created 4 years, 10 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
« no previous file with comments | « src/arguments.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 5357 matching lines...) Expand 10 before | Expand all | Expand 10 after
5368 __ str(r5, MemOperand(r9, kLimitOffset)); 5368 __ str(r5, MemOperand(r9, kLimitOffset));
5369 __ mov(r4, r0); 5369 __ mov(r4, r0);
5370 __ PrepareCallCFunction(1, r5); 5370 __ PrepareCallCFunction(1, r5);
5371 __ mov(r0, Operand(ExternalReference::isolate_address(isolate))); 5371 __ mov(r0, Operand(ExternalReference::isolate_address(isolate)));
5372 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate), 5372 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate),
5373 1); 5373 1);
5374 __ mov(r0, r4); 5374 __ mov(r0, r4);
5375 __ jmp(&leave_exit_frame); 5375 __ jmp(&leave_exit_frame);
5376 } 5376 }
5377 5377
5378
5379 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5378 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5380 const ParameterCount& argc, 5379 const ParameterCount& argc,
5381 bool return_first_arg, 5380 bool return_first_arg,
5382 bool call_data_undefined) { 5381 bool call_data_undefined, bool is_lazy) {
5383 // ----------- S t a t e ------------- 5382 // ----------- S t a t e -------------
5384 // -- r0 : callee 5383 // -- r0 : callee
5385 // -- r4 : call_data 5384 // -- r4 : call_data
5386 // -- r2 : holder 5385 // -- r2 : holder
5387 // -- r1 : api_function_address 5386 // -- r1 : api_function_address
5388 // -- r3 : number of arguments if argc is a register 5387 // -- r3 : number of arguments if argc is a register
5389 // -- cp : context 5388 // -- cp : context
5390 // -- 5389 // --
5391 // -- sp[0] : last argument 5390 // -- sp[0] : last argument
5392 // -- ... 5391 // -- ...
(...skipping 15 matching lines...) Expand all
5408 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5407 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5409 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5408 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5410 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5409 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5411 STATIC_ASSERT(FCA::kHolderIndex == 0); 5410 STATIC_ASSERT(FCA::kHolderIndex == 0);
5412 STATIC_ASSERT(FCA::kArgsLength == 7); 5411 STATIC_ASSERT(FCA::kArgsLength == 7);
5413 5412
5414 DCHECK(argc.is_immediate() || r3.is(argc.reg())); 5413 DCHECK(argc.is_immediate() || r3.is(argc.reg()));
5415 5414
5416 // context save 5415 // context save
5417 __ push(context); 5416 __ push(context);
5418 // load context from callee 5417 if (!is_lazy) {
5419 __ ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset)); 5418 // load context from callee
5419 __ ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5420 }
5420 5421
5421 // callee 5422 // callee
5422 __ push(callee); 5423 __ push(callee);
5423 5424
5424 // call data 5425 // call data
5425 __ push(call_data); 5426 __ push(call_data);
5426 5427
5427 Register scratch = call_data; 5428 Register scratch = call_data;
5428 if (!call_data_undefined) { 5429 if (!call_data_undefined) {
5429 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5430 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 } 5502 }
5502 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space, 5503 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
5503 stack_space_operand, return_value_operand, 5504 stack_space_operand, return_value_operand,
5504 &context_restore_operand); 5505 &context_restore_operand);
5505 } 5506 }
5506 5507
5507 5508
5508 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5509 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5509 bool call_data_undefined = this->call_data_undefined(); 5510 bool call_data_undefined = this->call_data_undefined();
5510 CallApiFunctionStubHelper(masm, ParameterCount(r3), false, 5511 CallApiFunctionStubHelper(masm, ParameterCount(r3), false,
5511 call_data_undefined); 5512 call_data_undefined, false);
5512 } 5513 }
5513 5514
5514 5515
5515 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5516 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5516 bool is_store = this->is_store(); 5517 bool is_store = this->is_store();
5517 int argc = this->argc(); 5518 int argc = this->argc();
5518 bool call_data_undefined = this->call_data_undefined(); 5519 bool call_data_undefined = this->call_data_undefined();
5520 bool is_lazy = this->is_lazy();
5519 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5521 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5520 call_data_undefined); 5522 call_data_undefined, is_lazy);
5521 } 5523 }
5522 5524
5523 5525
5524 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5526 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5525 // ----------- S t a t e ------------- 5527 // ----------- S t a t e -------------
5526 // -- sp[0] : name 5528 // -- sp[0] : name
5527 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_ 5529 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
5528 // -- ... 5530 // -- ...
5529 // -- r2 : api_function_address 5531 // -- r2 : api_function_address
5530 // ----------------------------------- 5532 // -----------------------------------
(...skipping 27 matching lines...) Expand all
5558 kStackUnwindSpace, NULL, return_value_operand, NULL); 5560 kStackUnwindSpace, NULL, return_value_operand, NULL);
5559 } 5561 }
5560 5562
5561 5563
5562 #undef __ 5564 #undef __
5563 5565
5564 } // namespace internal 5566 } // namespace internal
5565 } // namespace v8 5567 } // namespace v8
5566 5568
5567 #endif // V8_TARGET_ARCH_ARM 5569 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arguments.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698