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

Side by Side Diff: src/mips/builtins-mips.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_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 __ Branch(&entry); 792 __ Branch(&entry);
793 __ bind(&loop); 793 __ bind(&loop);
794 __ sll(at, t0, kPointerSizeLog2 - 1); 794 __ sll(at, t0, kPointerSizeLog2 - 1);
795 __ Addu(at, a2, Operand(at)); 795 __ Addu(at, a2, Operand(at));
796 __ lw(at, MemOperand(at)); 796 __ lw(at, MemOperand(at));
797 __ push(at); 797 __ push(at);
798 __ bind(&entry); 798 __ bind(&entry);
799 __ Subu(t0, t0, Operand(2)); 799 __ Subu(t0, t0, Operand(2));
800 __ Branch(&loop, ge, t0, Operand(zero_reg)); 800 __ Branch(&loop, ge, t0, Operand(zero_reg));
801 801
802 __ Addu(a0, a0, Operand(1));
803
804 // Handle step in. 802 // Handle step in.
805 Label skip_step_in; 803 Label skip_step_in;
806 ExternalReference debug_step_in_fp = 804 ExternalReference debug_step_in_fp =
807 ExternalReference::debug_step_in_fp_address(masm->isolate()); 805 ExternalReference::debug_step_in_fp_address(masm->isolate());
808 __ li(a2, Operand(debug_step_in_fp)); 806 __ li(a2, Operand(debug_step_in_fp));
809 __ lw(a2, MemOperand(a2)); 807 __ lw(a2, MemOperand(a2));
810 __ Branch(&skip_step_in, eq, a2, Operand(zero_reg)); 808 __ Branch(&skip_step_in, eq, a2, Operand(zero_reg));
811 809
812 __ Push(a0, a1, a1); 810 __ Push(a0, a1, a1);
813 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1); 811 __ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1);
814 __ Pop(a0, a1); 812 __ Pop(a0, a1);
815 813
816 __ bind(&skip_step_in); 814 __ bind(&skip_step_in);
817 815
818 // Call the function. 816 // Call the function.
819 // a0: number of arguments 817 // a0: number of arguments
820 // a1: constructor function 818 // a1: constructor function
821 ParameterCount actual(a0); 819 ParameterCount actual(a0);
822 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper()); 820 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper());
823 821
824 // Restore context from the frame. 822 // Restore context from the frame.
825 // v0: result 823 // v0: result
826 // sp[0]: number of arguments (smi-tagged) 824 // sp[0]: new.target
825 // sp[1]: number of arguments (smi-tagged)
827 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 826 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
828 __ lw(a1, MemOperand(sp, 0)); 827 __ lw(a1, MemOperand(sp, kPointerSize));
829 828
830 // Leave construct frame. 829 // Leave construct frame.
831 } 830 }
832 831
833 __ sll(at, a1, kPointerSizeLog2 - 1); 832 __ sll(at, a1, kPointerSizeLog2 - 1);
834 __ Addu(sp, sp, Operand(at)); 833 __ Addu(sp, sp, Operand(at));
835 __ Addu(sp, sp, Operand(kPointerSize)); 834 __ Addu(sp, sp, Operand(kPointerSize));
836 __ Jump(ra); 835 __ Jump(ra);
837 } 836 }
838 837
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 } 1837 }
1839 } 1838 }
1840 1839
1841 1840
1842 #undef __ 1841 #undef __
1843 1842
1844 } // namespace internal 1843 } // namespace internal
1845 } // namespace v8 1844 } // namespace v8
1846 1845
1847 #endif // V8_TARGET_ARCH_MIPS 1846 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698