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

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

Issue 1909903003: [Interpreter] Use FastNewSloppyArguments when possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ports Created 4 years, 8 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/mips/code-stubs-mips.cc ('k') | src/objects.h » ('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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4989 matching lines...) Expand 10 before | Expand all | Expand 10 after
5000 5000
5001 void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) { 5001 void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
5002 // ----------- S t a t e ------------- 5002 // ----------- S t a t e -------------
5003 // -- a1 : function 5003 // -- a1 : function
5004 // -- cp : context 5004 // -- cp : context
5005 // -- fp : frame pointer 5005 // -- fp : frame pointer
5006 // -- ra : return address 5006 // -- ra : return address
5007 // ----------------------------------- 5007 // -----------------------------------
5008 __ AssertFunction(a1); 5008 __ AssertFunction(a1);
5009 5009
5010 // For Ignition we need to skip all possible handler/stub frames until
5011 // we reach the JavaScript frame for the function (similar to what the
5012 // runtime fallback implementation does). So make t0 point to that
5013 // JavaScript frame.
5014 {
5015 Label loop, loop_entry;
5016 __ Branch(USE_DELAY_SLOT, &loop_entry);
5017 __ mov(t0, fp); // In delay slot.
5018 __ bind(&loop);
5019 __ ld(t0, MemOperand(t0, StandardFrameConstants::kCallerFPOffset));
5020 __ bind(&loop_entry);
5021 __ ld(a3, MemOperand(t0, StandardFrameConstants::kFunctionOffset));
5022 __ Branch(&loop, ne, a1, Operand(a3));
5023 }
5024
5010 // TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub. 5025 // TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
5011 __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); 5026 __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
5012 __ lw(a2, 5027 __ lw(a2,
5013 FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); 5028 FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset));
5014 __ Lsa(a3, fp, a2, kPointerSizeLog2); 5029 __ Lsa(a3, t0, a2, kPointerSizeLog2);
5015 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); 5030 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
5016 __ SmiTag(a2); 5031 __ SmiTag(a2);
5017 5032
5018 // a1 : function 5033 // a1 : function
5019 // a2 : number of parameters (tagged) 5034 // a2 : number of parameters (tagged)
5020 // a3 : parameters pointer 5035 // a3 : parameters pointer
5036 // t0 : Javascript frame pointer
5021 // Registers used over whole function: 5037 // Registers used over whole function:
5022 // a5 : arguments count (tagged) 5038 // a5 : arguments count (tagged)
5023 // a6 : mapped parameter count (tagged) 5039 // a6 : mapped parameter count (tagged)
5024 5040
5025 // Check if the calling frame is an arguments adaptor frame. 5041 // Check if the calling frame is an arguments adaptor frame.
5026 Label adaptor_frame, try_allocate, runtime; 5042 Label adaptor_frame, try_allocate, runtime;
5027 __ ld(a4, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 5043 __ ld(a4, MemOperand(t0, StandardFrameConstants::kCallerFPOffset));
5028 __ ld(a0, MemOperand(a4, CommonFrameConstants::kContextOrFrameTypeOffset)); 5044 __ ld(a0, MemOperand(a4, CommonFrameConstants::kContextOrFrameTypeOffset));
5029 __ Branch(&adaptor_frame, eq, a0, 5045 __ Branch(&adaptor_frame, eq, a0,
5030 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 5046 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
5031 5047
5032 // No adaptor, parameter count = argument count. 5048 // No adaptor, parameter count = argument count.
5033 __ mov(a5, a2); 5049 __ mov(a5, a2);
5034 __ Branch(USE_DELAY_SLOT, &try_allocate); 5050 __ Branch(USE_DELAY_SLOT, &try_allocate);
5035 __ mov(a6, a2); // In delay slot. 5051 __ mov(a6, a2); // In delay slot.
5036 5052
5037 // We have an adaptor frame. Patch the parameters pointer. 5053 // We have an adaptor frame. Patch the parameters pointer.
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
5769 kStackUnwindSpace, kInvalidStackOffset, 5785 kStackUnwindSpace, kInvalidStackOffset,
5770 return_value_operand, NULL); 5786 return_value_operand, NULL);
5771 } 5787 }
5772 5788
5773 #undef __ 5789 #undef __
5774 5790
5775 } // namespace internal 5791 } // namespace internal
5776 } // namespace v8 5792 } // namespace v8
5777 5793
5778 #endif // V8_TARGET_ARCH_MIPS64 5794 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698