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

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: 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 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 5416 matching lines...) Expand 10 before | Expand all | Expand 10 after
5427 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate), 5427 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate),
5428 1); 5428 1);
5429 __ mr(r3, r14); 5429 __ mr(r3, r14);
5430 __ b(&leave_exit_frame); 5430 __ b(&leave_exit_frame);
5431 } 5431 }
5432 5432
5433 5433
5434 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5434 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5435 const ParameterCount& argc, 5435 const ParameterCount& argc,
5436 bool return_first_arg, 5436 bool return_first_arg,
5437 bool call_data_undefined) { 5437 bool call_data_undefined, bool is_lazy) {
5438 // ----------- S t a t e ------------- 5438 // ----------- S t a t e -------------
5439 // -- r3 : callee 5439 // -- r3 : callee
5440 // -- r7 : call_data 5440 // -- r7 : call_data
5441 // -- r5 : holder 5441 // -- r5 : holder
5442 // -- r4 : api_function_address 5442 // -- r4 : api_function_address
5443 // -- r6 : number of arguments if argc is a register 5443 // -- r6 : number of arguments if argc is a register
5444 // -- cp : context 5444 // -- cp : context
5445 // -- 5445 // --
5446 // -- sp[0] : last argument 5446 // -- sp[0] : last argument
5447 // -- ... 5447 // -- ...
(...skipping 15 matching lines...) Expand all
5463 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5463 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5464 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5464 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5465 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5465 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5466 STATIC_ASSERT(FCA::kHolderIndex == 0); 5466 STATIC_ASSERT(FCA::kHolderIndex == 0);
5467 STATIC_ASSERT(FCA::kArgsLength == 7); 5467 STATIC_ASSERT(FCA::kArgsLength == 7);
5468 5468
5469 DCHECK(argc.is_immediate() || r3.is(argc.reg())); 5469 DCHECK(argc.is_immediate() || r3.is(argc.reg()));
5470 5470
5471 // context save 5471 // context save
5472 __ push(context); 5472 __ push(context);
5473 // load context from callee 5473 if (!is_lazy) {
5474 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset)); 5474 // load context from callee
5475 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5476 }
5475 5477
5476 // callee 5478 // callee
5477 __ push(callee); 5479 __ push(callee);
5478 5480
5479 // call data 5481 // call data
5480 __ push(call_data); 5482 __ push(call_data);
5481 5483
5482 Register scratch = call_data; 5484 Register scratch = call_data;
5483 if (!call_data_undefined) { 5485 if (!call_data_undefined) {
5484 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5486 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5563 } 5565 }
5564 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space, 5566 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
5565 stack_space_operand, return_value_operand, 5567 stack_space_operand, return_value_operand,
5566 &context_restore_operand); 5568 &context_restore_operand);
5567 } 5569 }
5568 5570
5569 5571
5570 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5572 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5571 bool call_data_undefined = this->call_data_undefined(); 5573 bool call_data_undefined = this->call_data_undefined();
5572 CallApiFunctionStubHelper(masm, ParameterCount(r6), false, 5574 CallApiFunctionStubHelper(masm, ParameterCount(r6), false,
5573 call_data_undefined); 5575 call_data_undefined, false);
5574 } 5576 }
5575 5577
5576 5578
5577 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5579 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5578 bool is_store = this->is_store(); 5580 bool is_store = this->is_store();
5579 int argc = this->argc(); 5581 int argc = this->argc();
5580 bool call_data_undefined = this->call_data_undefined(); 5582 bool call_data_undefined = this->call_data_undefined();
5583 bool is_lazy = this->is_lazy();
5581 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5584 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5582 call_data_undefined); 5585 call_data_undefined, is_lazy);
5583 } 5586 }
5584 5587
5585 5588
5586 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5589 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5587 // ----------- S t a t e ------------- 5590 // ----------- S t a t e -------------
5588 // -- sp[0] : name 5591 // -- sp[0] : name
5589 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object 5592 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object
5590 // -- ... 5593 // -- ...
5591 // -- r5 : api_function_address 5594 // -- r5 : api_function_address
5592 // ----------------------------------- 5595 // -----------------------------------
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5644 kStackUnwindSpace, NULL, 5647 kStackUnwindSpace, NULL,
5645 MemOperand(fp, 6 * kPointerSize), NULL); 5648 MemOperand(fp, 6 * kPointerSize), NULL);
5646 } 5649 }
5647 5650
5648 5651
5649 #undef __ 5652 #undef __
5650 } // namespace internal 5653 } // namespace internal
5651 } // namespace v8 5654 } // namespace v8
5652 5655
5653 #endif // V8_TARGET_ARCH_PPC 5656 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« src/builtins.cc ('K') | « 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