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

Side by Side Diff: src/ppc/code-stubs-ppc.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/objects.cc ('k') | src/runtime/runtime-debug.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 5441 matching lines...) Expand 10 before | Expand all | Expand 10 after
5452 __ StoreP(r15, MemOperand(r17, kLimitOffset)); 5452 __ StoreP(r15, MemOperand(r17, kLimitOffset));
5453 __ mr(r14, r3); 5453 __ mr(r14, r3);
5454 __ PrepareCallCFunction(1, r15); 5454 __ PrepareCallCFunction(1, r15);
5455 __ mov(r3, Operand(ExternalReference::isolate_address(isolate))); 5455 __ mov(r3, Operand(ExternalReference::isolate_address(isolate)));
5456 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate), 5456 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate),
5457 1); 5457 1);
5458 __ mr(r3, r14); 5458 __ mr(r3, r14);
5459 __ b(&leave_exit_frame); 5459 __ b(&leave_exit_frame);
5460 } 5460 }
5461 5461
5462
5463 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5462 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5464 const ParameterCount& argc, 5463 const ParameterCount& argc,
5465 bool return_first_arg, 5464 bool return_first_arg,
5466 bool call_data_undefined) { 5465 bool call_data_undefined, bool is_lazy) {
5467 // ----------- S t a t e ------------- 5466 // ----------- S t a t e -------------
5468 // -- r3 : callee 5467 // -- r3 : callee
5469 // -- r7 : call_data 5468 // -- r7 : call_data
5470 // -- r5 : holder 5469 // -- r5 : holder
5471 // -- r4 : api_function_address 5470 // -- r4 : api_function_address
5472 // -- r6 : number of arguments if argc is a register 5471 // -- r6 : number of arguments if argc is a register
5473 // -- cp : context 5472 // -- cp : context
5474 // -- 5473 // --
5475 // -- sp[0] : last argument 5474 // -- sp[0] : last argument
5476 // -- ... 5475 // -- ...
(...skipping 15 matching lines...) Expand all
5492 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5491 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5493 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5492 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5494 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5493 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5495 STATIC_ASSERT(FCA::kHolderIndex == 0); 5494 STATIC_ASSERT(FCA::kHolderIndex == 0);
5496 STATIC_ASSERT(FCA::kArgsLength == 7); 5495 STATIC_ASSERT(FCA::kArgsLength == 7);
5497 5496
5498 DCHECK(argc.is_immediate() || r3.is(argc.reg())); 5497 DCHECK(argc.is_immediate() || r3.is(argc.reg()));
5499 5498
5500 // context save 5499 // context save
5501 __ push(context); 5500 __ push(context);
5502 // load context from callee 5501 if (!is_lazy) {
5503 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset)); 5502 // load context from callee
5503 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5504 }
5504 5505
5505 // callee 5506 // callee
5506 __ push(callee); 5507 __ push(callee);
5507 5508
5508 // call data 5509 // call data
5509 __ push(call_data); 5510 __ push(call_data);
5510 5511
5511 Register scratch = call_data; 5512 Register scratch = call_data;
5512 if (!call_data_undefined) { 5513 if (!call_data_undefined) {
5513 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5514 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5592 } 5593 }
5593 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space, 5594 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
5594 stack_space_operand, return_value_operand, 5595 stack_space_operand, return_value_operand,
5595 &context_restore_operand); 5596 &context_restore_operand);
5596 } 5597 }
5597 5598
5598 5599
5599 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5600 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5600 bool call_data_undefined = this->call_data_undefined(); 5601 bool call_data_undefined = this->call_data_undefined();
5601 CallApiFunctionStubHelper(masm, ParameterCount(r6), false, 5602 CallApiFunctionStubHelper(masm, ParameterCount(r6), false,
5602 call_data_undefined); 5603 call_data_undefined, false);
5603 } 5604 }
5604 5605
5605 5606
5606 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5607 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5607 bool is_store = this->is_store(); 5608 bool is_store = this->is_store();
5608 int argc = this->argc(); 5609 int argc = this->argc();
5609 bool call_data_undefined = this->call_data_undefined(); 5610 bool call_data_undefined = this->call_data_undefined();
5611 bool is_lazy = this->is_lazy();
5610 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5612 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5611 call_data_undefined); 5613 call_data_undefined, is_lazy);
5612 } 5614 }
5613 5615
5614 5616
5615 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5617 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5616 // ----------- S t a t e ------------- 5618 // ----------- S t a t e -------------
5617 // -- sp[0] : name 5619 // -- sp[0] : name
5618 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_ 5620 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
5619 // -- ... 5621 // -- ...
5620 // -- r5 : api_function_address 5622 // -- r5 : api_function_address
5621 // ----------------------------------- 5623 // -----------------------------------
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5680 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5679 kStackUnwindSpace, NULL, return_value_operand, NULL); 5681 kStackUnwindSpace, NULL, return_value_operand, NULL);
5680 } 5682 }
5681 5683
5682 5684
5683 #undef __ 5685 #undef __
5684 } // namespace internal 5686 } // namespace internal
5685 } // namespace v8 5687 } // namespace v8
5686 5688
5687 #endif // V8_TARGET_ARCH_PPC 5689 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698