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

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