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

Side by Side Diff: src/mips/code-stubs-mips.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/ic/x87/handler-compiler-x87.cc ('k') | src/mips64/code-stubs-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 5539 matching lines...) Expand 10 before | Expand all | Expand 10 after
5550 __ mov(s0, v0); 5550 __ mov(s0, v0);
5551 __ mov(a0, v0); 5551 __ mov(a0, v0);
5552 __ PrepareCallCFunction(1, s1); 5552 __ PrepareCallCFunction(1, s1);
5553 __ li(a0, Operand(ExternalReference::isolate_address(isolate))); 5553 __ li(a0, Operand(ExternalReference::isolate_address(isolate)));
5554 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate), 5554 __ CallCFunction(ExternalReference::delete_handle_scope_extensions(isolate),
5555 1); 5555 1);
5556 __ mov(v0, s0); 5556 __ mov(v0, s0);
5557 __ jmp(&leave_exit_frame); 5557 __ jmp(&leave_exit_frame);
5558 } 5558 }
5559 5559
5560
5561 static void CallApiFunctionStubHelper(MacroAssembler* masm, 5560 static void CallApiFunctionStubHelper(MacroAssembler* masm,
5562 const ParameterCount& argc, 5561 const ParameterCount& argc,
5563 bool return_first_arg, 5562 bool return_first_arg,
5564 bool call_data_undefined) { 5563 bool call_data_undefined, bool is_lazy) {
5565 // ----------- S t a t e ------------- 5564 // ----------- S t a t e -------------
5566 // -- a0 : callee 5565 // -- a0 : callee
5567 // -- t0 : call_data 5566 // -- t0 : call_data
5568 // -- a2 : holder 5567 // -- a2 : holder
5569 // -- a1 : api_function_address 5568 // -- a1 : api_function_address
5570 // -- a3 : number of arguments if argc is a register 5569 // -- a3 : number of arguments if argc is a register
5571 // -- cp : context 5570 // -- cp : context
5572 // -- 5571 // --
5573 // -- sp[0] : last argument 5572 // -- sp[0] : last argument
5574 // -- ... 5573 // -- ...
(...skipping 15 matching lines...) Expand all
5590 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5589 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5591 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5590 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5592 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5591 STATIC_ASSERT(FCA::kIsolateIndex == 1);
5593 STATIC_ASSERT(FCA::kHolderIndex == 0); 5592 STATIC_ASSERT(FCA::kHolderIndex == 0);
5594 STATIC_ASSERT(FCA::kArgsLength == 7); 5593 STATIC_ASSERT(FCA::kArgsLength == 7);
5595 5594
5596 DCHECK(argc.is_immediate() || a3.is(argc.reg())); 5595 DCHECK(argc.is_immediate() || a3.is(argc.reg()));
5597 5596
5598 // Save context, callee and call data. 5597 // Save context, callee and call data.
5599 __ Push(context, callee, call_data); 5598 __ Push(context, callee, call_data);
5600 // Load context from callee. 5599 if (!is_lazy) {
5601 __ lw(context, FieldMemOperand(callee, JSFunction::kContextOffset)); 5600 // Load context from callee.
5601 __ lw(context, FieldMemOperand(callee, JSFunction::kContextOffset));
5602 }
5602 5603
5603 Register scratch = call_data; 5604 Register scratch = call_data;
5604 if (!call_data_undefined) { 5605 if (!call_data_undefined) {
5605 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5606 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5606 } 5607 }
5607 // Push return value and default return value. 5608 // Push return value and default return value.
5608 __ Push(scratch, scratch); 5609 __ Push(scratch, scratch);
5609 __ li(scratch, Operand(ExternalReference::isolate_address(masm->isolate()))); 5610 __ li(scratch, Operand(ExternalReference::isolate_address(masm->isolate())));
5610 // Push isolate and holder. 5611 // Push isolate and holder.
5611 __ Push(scratch, holder); 5612 __ Push(scratch, holder);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
5672 } 5673 }
5673 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space, 5674 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
5674 stack_space_offset, return_value_operand, 5675 stack_space_offset, return_value_operand,
5675 &context_restore_operand); 5676 &context_restore_operand);
5676 } 5677 }
5677 5678
5678 5679
5679 void CallApiFunctionStub::Generate(MacroAssembler* masm) { 5680 void CallApiFunctionStub::Generate(MacroAssembler* masm) {
5680 bool call_data_undefined = this->call_data_undefined(); 5681 bool call_data_undefined = this->call_data_undefined();
5681 CallApiFunctionStubHelper(masm, ParameterCount(a3), false, 5682 CallApiFunctionStubHelper(masm, ParameterCount(a3), false,
5682 call_data_undefined); 5683 call_data_undefined, false);
5683 } 5684 }
5684 5685
5685 5686
5686 void CallApiAccessorStub::Generate(MacroAssembler* masm) { 5687 void CallApiAccessorStub::Generate(MacroAssembler* masm) {
5687 bool is_store = this->is_store(); 5688 bool is_store = this->is_store();
5688 int argc = this->argc(); 5689 int argc = this->argc();
5689 bool call_data_undefined = this->call_data_undefined(); 5690 bool call_data_undefined = this->call_data_undefined();
5691 bool is_lazy = this->is_lazy();
5690 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5692 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5691 call_data_undefined); 5693 call_data_undefined, is_lazy);
5692 } 5694 }
5693 5695
5694 5696
5695 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5697 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5696 // ----------- S t a t e ------------- 5698 // ----------- S t a t e -------------
5697 // -- sp[0] : name 5699 // -- sp[0] : name
5698 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_ 5700 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
5699 // -- ... 5701 // -- ...
5700 // -- a2 : api_function_address 5702 // -- a2 : api_function_address
5701 // ----------------------------------- 5703 // -----------------------------------
(...skipping 28 matching lines...) Expand all
5730 return_value_operand, NULL); 5732 return_value_operand, NULL);
5731 } 5733 }
5732 5734
5733 5735
5734 #undef __ 5736 #undef __
5735 5737
5736 } // namespace internal 5738 } // namespace internal
5737 } // namespace v8 5739 } // namespace v8
5738 5740
5739 #endif // V8_TARGET_ARCH_MIPS 5741 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x87/handler-compiler-x87.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698