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

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

Powered by Google App Engine
This is Rietveld 408576698