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

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: Oversight 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
« no previous file with comments | « src/transitions-inl.h ('k') | src/x87/builtins-x87.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_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 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 __ Push(Operand(rax, 0)); 1802 __ Push(Operand(rax, 0));
1803 __ subp(rax, Immediate(kPointerSize)); 1803 __ subp(rax, Immediate(kPointerSize));
1804 __ cmpp(r8, rbx); 1804 __ cmpp(r8, rbx);
1805 __ j(less, &copy); 1805 __ j(less, &copy);
1806 __ jmp(&invoke); 1806 __ jmp(&invoke);
1807 } 1807 }
1808 1808
1809 { // Too few parameters: Actual < expected. 1809 { // Too few parameters: Actual < expected.
1810 __ bind(&too_few); 1810 __ bind(&too_few);
1811 1811
1812 // If the function is strong we need to throw an error.
1813 Label no_strong_error;
1814 __ movp(kScratchRegister,
1815 FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
1816 __ testb(FieldOperand(kScratchRegister,
1817 SharedFunctionInfo::kStrongModeByteOffset),
1818 Immediate(1 << SharedFunctionInfo::kStrongModeBitWithinByte));
1819 __ j(equal, &no_strong_error, Label::kNear);
1820
1821 // What we really care about is the required number of arguments.
1822
1823 if (kPointerSize == kInt32Size) {
1824 __ movp(
1825 kScratchRegister,
1826 FieldOperand(kScratchRegister, SharedFunctionInfo::kLengthOffset));
1827 __ SmiToInteger32(kScratchRegister, kScratchRegister);
1828 } else {
1829 // See comment near kLengthOffset in src/objects.h
1830 __ movsxlq(
1831 kScratchRegister,
1832 FieldOperand(kScratchRegister, SharedFunctionInfo::kLengthOffset));
1833 __ shrq(kScratchRegister, Immediate(1));
1834 }
1835
1836 __ cmpp(rax, kScratchRegister);
1837 __ j(greater_equal, &no_strong_error, Label::kNear);
1838
1839 {
1840 FrameScope frame(masm, StackFrame::MANUAL);
1841 EnterArgumentsAdaptorFrame(masm);
1842 __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
1843 }
1844
1845 __ bind(&no_strong_error);
1846 EnterArgumentsAdaptorFrame(masm); 1812 EnterArgumentsAdaptorFrame(masm);
1847 ArgumentsAdaptorStackCheck(masm, &stack_overflow); 1813 ArgumentsAdaptorStackCheck(masm, &stack_overflow);
1848 1814
1849 // Copy receiver and all actual arguments. 1815 // Copy receiver and all actual arguments.
1850 const int offset = StandardFrameConstants::kCallerSPOffset; 1816 const int offset = StandardFrameConstants::kCallerSPOffset;
1851 __ leap(rdi, Operand(rbp, rax, times_pointer_size, offset)); 1817 __ leap(rdi, Operand(rbp, rax, times_pointer_size, offset));
1852 __ Set(r8, -1); // account for receiver 1818 __ Set(r8, -1); // account for receiver
1853 1819
1854 Label copy; 1820 Label copy;
1855 __ bind(&copy); 1821 __ bind(&copy);
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 __ ret(0); 2652 __ ret(0);
2687 } 2653 }
2688 2654
2689 2655
2690 #undef __ 2656 #undef __
2691 2657
2692 } // namespace internal 2658 } // namespace internal
2693 } // namespace v8 2659 } // namespace v8
2694 2660
2695 #endif // V8_TARGET_ARCH_X64 2661 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « 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