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

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

Issue 2284673002: Fix LookupCode for the DatePrototype_GetField builtin (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 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/builtins/arm/builtins-arm.cc ('k') | src/builtins/ia32/builtins-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 __ Ret(); 1863 __ Ret();
1864 1864
1865 // 3. Raise a TypeError if the receiver is not a date. 1865 // 3. Raise a TypeError if the receiver is not a date.
1866 __ Bind(&receiver_not_date); 1866 __ Bind(&receiver_not_date);
1867 { 1867 {
1868 FrameScope scope(masm, StackFrame::MANUAL); 1868 FrameScope scope(masm, StackFrame::MANUAL);
1869 __ Push(x0); 1869 __ Push(x0);
1870 __ Mov(x0, Smi::FromInt(0)); 1870 __ Mov(x0, Smi::FromInt(0));
1871 __ EnterBuiltinFrame(cp, x1, x0); 1871 __ EnterBuiltinFrame(cp, x1, x0);
1872 __ CallRuntime(Runtime::kThrowNotDateError); 1872 __ CallRuntime(Runtime::kThrowNotDateError);
1873
1874 // It's far from obvious, but this final trailing instruction after the call
1875 // is required for StackFrame::LookupCode to work correctly. To illustrate
1876 // why: if call were the final instruction in the code object, then the pc
1877 // (== return address) would point beyond the code object when the stack is
1878 // traversed. When we then try to look up the code object through
1879 // StackFrame::LookupCode, we actually return the next code object that
1880 // happens to be on the same page in memory.
1881 // TODO(jgruber): A proper fix for this would be nice.
1882 __ nop();
1873 } 1883 }
1874 } 1884 }
1875 1885
1876 // static 1886 // static
1877 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1887 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1878 // ----------- S t a t e ------------- 1888 // ----------- S t a t e -------------
1879 // -- x0 : argc 1889 // -- x0 : argc
1880 // -- jssp[0] : argArray (if argc == 2) 1890 // -- jssp[0] : argArray (if argc == 2)
1881 // -- jssp[8] : thisArg (if argc >= 1) 1891 // -- jssp[8] : thisArg (if argc >= 1)
1882 // -- jssp[16] : receiver 1892 // -- jssp[16] : receiver
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
3037 __ Unreachable(); 3047 __ Unreachable();
3038 } 3048 }
3039 } 3049 }
3040 3050
3041 #undef __ 3051 #undef __
3042 3052
3043 } // namespace internal 3053 } // namespace internal
3044 } // namespace v8 3054 } // namespace v8
3045 3055
3046 #endif // V8_TARGET_ARCH_ARM 3056 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698