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/x64/builtins-x64.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/s390/builtins-s390.cc ('k') | src/builtins/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 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 } 1318 }
1319 __ ret(1 * kPointerSize); 1319 __ ret(1 * kPointerSize);
1320 1320
1321 // 3. Raise a TypeError if the receiver is not a date. 1321 // 3. Raise a TypeError if the receiver is not a date.
1322 __ bind(&receiver_not_date); 1322 __ bind(&receiver_not_date);
1323 { 1323 {
1324 FrameScope scope(masm, StackFrame::MANUAL); 1324 FrameScope scope(masm, StackFrame::MANUAL);
1325 __ Move(rbx, Smi::FromInt(0)); 1325 __ Move(rbx, Smi::FromInt(0));
1326 __ EnterBuiltinFrame(rsi, rdi, rbx); 1326 __ EnterBuiltinFrame(rsi, rdi, rbx);
1327 __ CallRuntime(Runtime::kThrowNotDateError); 1327 __ CallRuntime(Runtime::kThrowNotDateError);
1328
1329 // It's far from obvious, but this final trailing instruction after the call
1330 // is required for StackFrame::LookupCode to work correctly. To illustrate
1331 // why: if call were the final instruction in the code object, then the pc
1332 // (== return address) would point beyond the code object when the stack is
1333 // traversed. When we then try to look up the code object through
1334 // StackFrame::LookupCode, we actually return the next code object that
1335 // happens to be on the same page in memory.
1336 // TODO(jgruber): A proper fix for this would be nice.
1337 __ int3();
1328 } 1338 }
1329 } 1339 }
1330 1340
1331 // static 1341 // static
1332 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1342 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1333 // ----------- S t a t e ------------- 1343 // ----------- S t a t e -------------
1334 // -- rax : argc 1344 // -- rax : argc
1335 // -- rsp[0] : return address 1345 // -- rsp[0] : return address
1336 // -- rsp[8] : argArray 1346 // -- rsp[8] : argArray
1337 // -- rsp[16] : thisArg 1347 // -- rsp[16] : thisArg
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3088 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3079 Generate_OnStackReplacementHelper(masm, true); 3089 Generate_OnStackReplacementHelper(masm, true);
3080 } 3090 }
3081 3091
3082 #undef __ 3092 #undef __
3083 3093
3084 } // namespace internal 3094 } // namespace internal
3085 } // namespace v8 3095 } // namespace v8
3086 3096
3087 #endif // V8_TARGET_ARCH_X64 3097 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698