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

Side by Side Diff: src/builtins/ppc/builtins-ppc.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/mips64/builtins-mips64.cc ('k') | src/builtins/s390/builtins-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 __ Ret(); 1885 __ Ret();
1886 1886
1887 // 3. Raise a TypeError if the receiver is not a date. 1887 // 3. Raise a TypeError if the receiver is not a date.
1888 __ bind(&receiver_not_date); 1888 __ bind(&receiver_not_date);
1889 { 1889 {
1890 FrameScope scope(masm, StackFrame::MANUAL); 1890 FrameScope scope(masm, StackFrame::MANUAL);
1891 __ push(r3); 1891 __ push(r3);
1892 __ LoadSmiLiteral(r3, Smi::FromInt(0)); 1892 __ LoadSmiLiteral(r3, Smi::FromInt(0));
1893 __ EnterBuiltinFrame(cp, r4, r3); 1893 __ EnterBuiltinFrame(cp, r4, r3);
1894 __ CallRuntime(Runtime::kThrowNotDateError); 1894 __ CallRuntime(Runtime::kThrowNotDateError);
1895
1896 // It's far from obvious, but this final trailing instruction after the call
1897 // is required for StackFrame::LookupCode to work correctly. To illustrate
1898 // why: if call were the final instruction in the code object, then the pc
1899 // (== return address) would point beyond the code object when the stack is
1900 // traversed. When we then try to look up the code object through
1901 // StackFrame::LookupCode, we actually return the next code object that
1902 // happens to be on the same page in memory.
1903 // TODO(jgruber): A proper fix for this would be nice.
1904 __ nop();
1895 } 1905 }
1896 } 1906 }
1897 1907
1898 // static 1908 // static
1899 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1909 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1900 // ----------- S t a t e ------------- 1910 // ----------- S t a t e -------------
1901 // -- r3 : argc 1911 // -- r3 : argc
1902 // -- sp[0] : argArray 1912 // -- sp[0] : argArray
1903 // -- sp[4] : thisArg 1913 // -- sp[4] : thisArg
1904 // -- sp[8] : receiver 1914 // -- sp[8] : receiver
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 __ CallRuntime(Runtime::kThrowStackOverflow); 3016 __ CallRuntime(Runtime::kThrowStackOverflow);
3007 __ bkpt(0); 3017 __ bkpt(0);
3008 } 3018 }
3009 } 3019 }
3010 3020
3011 #undef __ 3021 #undef __
3012 } // namespace internal 3022 } // namespace internal
3013 } // namespace v8 3023 } // namespace v8
3014 3024
3015 #endif // V8_TARGET_ARCH_PPC 3025 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698