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

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

Issue 1773653002: [strong] Remove all remainders of strong mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 __ Push(Operand(rax, 0)); 1803 __ Push(Operand(rax, 0));
1804 __ subp(rax, Immediate(kPointerSize)); 1804 __ subp(rax, Immediate(kPointerSize));
1805 __ cmpp(r8, rbx); 1805 __ cmpp(r8, rbx);
1806 __ j(less, &copy); 1806 __ j(less, &copy);
1807 __ jmp(&invoke); 1807 __ jmp(&invoke);
1808 } 1808 }
1809 1809
1810 { // Too few parameters: Actual < expected. 1810 { // Too few parameters: Actual < expected.
1811 __ bind(&too_few); 1811 __ bind(&too_few);
1812 1812
1813 // If the function is strong we need to throw an error.
1814 Label no_strong_error;
1815 __ movp(kScratchRegister,
1816 FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
1817 __ testb(FieldOperand(kScratchRegister,
1818 SharedFunctionInfo::kStrongModeByteOffset),
1819 Immediate(1 << SharedFunctionInfo::kStrongModeBitWithinByte));
1820 __ j(equal, &no_strong_error, Label::kNear);
1821
1822 // What we really care about is the required number of arguments.
1823
1824 if (kPointerSize == kInt32Size) {
1825 __ movp(
1826 kScratchRegister,
1827 FieldOperand(kScratchRegister, SharedFunctionInfo::kLengthOffset));
1828 __ SmiToInteger32(kScratchRegister, kScratchRegister);
1829 } else {
1830 // See comment near kLengthOffset in src/objects.h
1831 __ movsxlq(
1832 kScratchRegister,
1833 FieldOperand(kScratchRegister, SharedFunctionInfo::kLengthOffset));
1834 __ shrq(kScratchRegister, Immediate(1));
1835 }
1836
1837 __ cmpp(rax, kScratchRegister);
1838 __ j(greater_equal, &no_strong_error, Label::kNear);
1839
1840 {
1841 FrameScope frame(masm, StackFrame::MANUAL);
1842 EnterArgumentsAdaptorFrame(masm);
1843 __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
1844 }
1845
1846 __ bind(&no_strong_error);
1847 EnterArgumentsAdaptorFrame(masm); 1813 EnterArgumentsAdaptorFrame(masm);
1848 ArgumentsAdaptorStackCheck(masm, &stack_overflow); 1814 ArgumentsAdaptorStackCheck(masm, &stack_overflow);
1849 1815
1850 // Copy receiver and all actual arguments. 1816 // Copy receiver and all actual arguments.
1851 const int offset = StandardFrameConstants::kCallerSPOffset; 1817 const int offset = StandardFrameConstants::kCallerSPOffset;
1852 __ leap(rdi, Operand(rbp, rax, times_pointer_size, offset)); 1818 __ leap(rdi, Operand(rbp, rax, times_pointer_size, offset));
1853 __ Set(r8, -1); // account for receiver 1819 __ Set(r8, -1); // account for receiver
1854 1820
1855 Label copy; 1821 Label copy;
1856 __ bind(&copy); 1822 __ bind(&copy);
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2743 __ ret(0); 2709 __ ret(0);
2744 } 2710 }
2745 2711
2746 2712
2747 #undef __ 2713 #undef __
2748 2714
2749 } // namespace internal 2715 } // namespace internal
2750 } // namespace v8 2716 } // namespace v8
2751 2717
2752 #endif // V8_TARGET_ARCH_X64 2718 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/parsing/parser.cc ('K') | « src/transitions-inl.h ('k') | src/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698