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

Side by Side Diff: src/builtins/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/builtins/ppc/builtins-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 __ Ret(); 1843 __ Ret();
1844 1844
1845 // 3. Raise a TypeError if the receiver is not a date. 1845 // 3. Raise a TypeError if the receiver is not a date.
1846 __ bind(&receiver_not_date); 1846 __ bind(&receiver_not_date);
1847 { 1847 {
1848 FrameScope scope(masm, StackFrame::MANUAL); 1848 FrameScope scope(masm, StackFrame::MANUAL);
1849 __ Push(a0); 1849 __ Push(a0);
1850 __ Move(a0, Smi::FromInt(0)); 1850 __ Move(a0, Smi::FromInt(0));
1851 __ EnterBuiltinFrame(cp, a1, a0); 1851 __ EnterBuiltinFrame(cp, a1, a0);
1852 __ CallRuntime(Runtime::kThrowNotDateError); 1852 __ CallRuntime(Runtime::kThrowNotDateError);
1853
1854 // It's far from obvious, but this final trailing instruction after the call
1855 // is required for StackFrame::LookupCode to work correctly. To illustrate
1856 // why: if call were the final instruction in the code object, then the pc
1857 // (== return address) would point beyond the code object when the stack is
1858 // traversed. When we then try to look up the code object through
1859 // StackFrame::LookupCode, we actually return the next code object that
1860 // happens to be on the same page in memory.
1861 // TODO(jgruber): A proper fix for this would be nice.
1862 __ nop();
1853 } 1863 }
1854 } 1864 }
1855 1865
1856 // static 1866 // static
1857 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1867 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1858 // ----------- S t a t e ------------- 1868 // ----------- S t a t e -------------
1859 // -- a0 : argc 1869 // -- a0 : argc
1860 // -- sp[0] : argArray 1870 // -- sp[0] : argArray
1861 // -- sp[4] : thisArg 1871 // -- sp[4] : thisArg
1862 // -- sp[8] : receiver 1872 // -- sp[8] : receiver
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 __ break_(0xCC); 3010 __ break_(0xCC);
3001 } 3011 }
3002 } 3012 }
3003 3013
3004 #undef __ 3014 #undef __
3005 3015
3006 } // namespace internal 3016 } // namespace internal
3007 } // namespace v8 3017 } // namespace v8
3008 3018
3009 #endif // V8_TARGET_ARCH_MIPS64 3019 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698