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

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 1196193014: Do not add extra argument for new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment added Created 5 years, 6 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 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 5
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 __ jmp(&entry); 802 __ jmp(&entry);
803 __ bind(&loop); 803 __ bind(&loop);
804 __ dsll(at, a4, kPointerSizeLog2); 804 __ dsll(at, a4, kPointerSizeLog2);
805 __ Daddu(at, a2, Operand(at)); 805 __ Daddu(at, a2, Operand(at));
806 __ ld(at, MemOperand(at)); 806 __ ld(at, MemOperand(at));
807 __ push(at); 807 __ push(at);
808 __ bind(&entry); 808 __ bind(&entry);
809 __ Daddu(a4, a4, Operand(-1)); 809 __ Daddu(a4, a4, Operand(-1));
810 __ Branch(&loop, ge, a4, Operand(zero_reg)); 810 __ Branch(&loop, ge, a4, Operand(zero_reg));
811 811
812 __ Daddu(a0, a0, Operand(1));
813
814 // Handle step in. 812 // Handle step in.
815 Label skip_step_in; 813 Label skip_step_in;
816 ExternalReference debug_step_in_fp = 814 ExternalReference debug_step_in_fp =
817 ExternalReference::debug_step_in_fp_address(masm->isolate()); 815 ExternalReference::debug_step_in_fp_address(masm->isolate());
818 __ li(a2, Operand(debug_step_in_fp)); 816 __ li(a2, Operand(debug_step_in_fp));
819 __ ld(a2, MemOperand(a2)); 817 __ ld(a2, MemOperand(a2));
820 __ Branch(&skip_step_in, eq, a2, Operand(zero_reg)); 818 __ Branch(&skip_step_in, eq, a2, Operand(zero_reg));
821 819
822 __ Push(a0, a1, a1); 820 __ Push(a0, a1, a1);
823 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1); 821 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1);
824 __ Pop(a0, a1); 822 __ Pop(a0, a1);
825 823
826 __ bind(&skip_step_in); 824 __ bind(&skip_step_in);
827 825
828 826
829 // Call the function. 827 // Call the function.
830 // a0: number of arguments 828 // a0: number of arguments
831 // a1: constructor function 829 // a1: constructor function
832 ParameterCount actual(a0); 830 ParameterCount actual(a0);
833 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper()); 831 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper());
834 832
835 // Restore context from the frame. 833 // Restore context from the frame.
836 // v0: result 834 // v0: result
837 // sp[0]: number of arguments (smi-tagged) 835 // sp[0]: new.target
836 // sp[1]: number of arguments (smi-tagged)
838 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 837 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
839 __ ld(a1, MemOperand(sp, 0)); 838 __ ld(a1, MemOperand(sp, kPointerSize));
840 839
841 // Leave construct frame. 840 // Leave construct frame.
842 } 841 }
843 842
844 __ SmiScale(at, a1, kPointerSizeLog2); 843 __ SmiScale(at, a1, kPointerSizeLog2);
845 __ Daddu(sp, sp, Operand(at)); 844 __ Daddu(sp, sp, Operand(at));
846 __ Daddu(sp, sp, Operand(kPointerSize)); 845 __ Daddu(sp, sp, Operand(kPointerSize));
847 __ Jump(ra); 846 __ Jump(ra);
848 } 847 }
849 848
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 } 1846 }
1848 } 1847 }
1849 1848
1850 1849
1851 #undef __ 1850 #undef __
1852 1851
1853 } // namespace internal 1852 } // namespace internal
1854 } // namespace v8 1853 } // namespace v8
1855 1854
1856 #endif // V8_TARGET_ARCH_MIPS64 1855 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698