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

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

Issue 1679683004: Revert of Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x64/code-stubs-x64.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
5462 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5463 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5463 const ParameterCount& argc, 5464 const ParameterCount& argc,
5464 bool return_first_arg, 5465 bool return_first_arg,
5465 bool call_data_undefined, bool is_lazy) { 5466 bool call_data_undefined) {
5466 // ----------- S t a t e ------------- 5467 // ----------- S t a t e -------------
5467 // -- r3 : callee 5468 // -- r3 : callee
5468 // -- r7 : call_data 5469 // -- r7 : call_data
5469 // -- r5 : holder 5470 // -- r5 : holder
5470 // -- r4 : api_function_address 5471 // -- r4 : api_function_address
5471 // -- r6 : number of arguments if argc is a register 5472 // -- r6 : number of arguments if argc is a register
5472 // -- cp : context 5473 // -- cp : context
5473 // -- 5474 // --
5474 // -- sp[0] : last argument 5475 // -- sp[0] : last argument
5475 // -- ... 5476 // -- ...
(...skipping 15 matching lines...) Expand all
5491 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5492 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5492 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5493 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5493 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5494 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5494 STATIC_ASSERT(FCA::kHolderIndex == 0); 5495 STATIC_ASSERT(FCA::kHolderIndex == 0);
5495 STATIC_ASSERT(FCA::kArgsLength == 7); 5496 STATIC_ASSERT(FCA::kArgsLength == 7);
5496 5497
5497 DCHECK(argc.is_immediate() || r3.is(argc.reg())); 5498 DCHECK(argc.is_immediate() || r3.is(argc.reg()));
5498 5499
5499 // context save 5500 // context save
5500 __ push(context); 5501 __ push(context);
5501 if (!is_lazy) { 5502 // load context from callee
5502 // load context from callee 5503 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5503 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5504 }
5505 5504
5506 // callee 5505 // callee
5507 __ push(callee); 5506 __ push(callee);
5508 5507
5509 // call data 5508 // call data
5510 __ push(call_data); 5509 __ push(call_data);
5511 5510
5512 Register scratch = call_data; 5511 Register scratch = call_data;
5513 if (!call_data_undefined) { 5512 if (!call_data_undefined) {
5514 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5513 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5593 } 5592 }
5594 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space, 5593 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
5595 stack_space_operand, return_value_operand, 5594 stack_space_operand, return_value_operand,
5596 &context_restore_operand); 5595 &context_restore_operand);
5597 } 5596 }
5598 5597
5599 5598
5600 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5599 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5601 bool call_data_undefined = this->call_data_undefined(); 5600 bool call_data_undefined = this->call_data_undefined();
5602 CallApiFunctionStubHelper(masm, ParameterCount(r6), false, 5601 CallApiFunctionStubHelper(masm, ParameterCount(r6), false,
5603 call_data_undefined, false); 5602 call_data_undefined);
5604 } 5603 }
5605 5604
5606 5605
5607 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5606 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5608 bool is_store = this->is_store(); 5607 bool is_store = this->is_store();
5609 int argc = this->argc(); 5608 int argc = this->argc();
5610 bool call_data_undefined = this->call_data_undefined(); 5609 bool call_data_undefined = this->call_data_undefined();
5611 bool is_lazy = this->is_lazy();
5612 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5610 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5613 call_data_undefined, is_lazy); 5611 call_data_undefined);
5614 } 5612 }
5615 5613
5616 5614
5617 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5615 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5618 // ----------- S t a t e ------------- 5616 // ----------- S t a t e -------------
5619 // -- sp[0] : name 5617 // -- sp[0] : name
5620 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_ 5618 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
5621 // -- ... 5619 // -- ...
5622 // -- r5 : api_function_address 5620 // -- r5 : api_function_address
5623 // ----------------------------------- 5621 // -----------------------------------
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
5680 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5678 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5681 kStackUnwindSpace, NULL, return_value_operand, NULL); 5679 kStackUnwindSpace, NULL, return_value_operand, NULL);
5682 } 5680 }
5683 5681
5684 5682
5685 #undef __ 5683 #undef __
5686 } // namespace internal 5684 } // namespace internal
5687 } // namespace v8 5685 } // namespace v8
5688 5686
5689 #endif // V8_TARGET_ARCH_PPC 5687 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698