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

Side by Side Diff: src/builtins/x87/builtins-x87.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/x64/builtins-x64.cc ('k') | src/frames-inl.h » ('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_X87 5 #if V8_TARGET_ARCH_X87
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 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 } 1267 }
1268 __ ret(1 * kPointerSize); 1268 __ ret(1 * kPointerSize);
1269 1269
1270 // 3. Raise a TypeError if the receiver is not a date. 1270 // 3. Raise a TypeError if the receiver is not a date.
1271 __ bind(&receiver_not_date); 1271 __ bind(&receiver_not_date);
1272 { 1272 {
1273 FrameScope scope(masm, StackFrame::MANUAL); 1273 FrameScope scope(masm, StackFrame::MANUAL);
1274 __ Move(ebx, Immediate(0)); 1274 __ Move(ebx, Immediate(0));
1275 __ EnterBuiltinFrame(esi, edi, ebx); 1275 __ EnterBuiltinFrame(esi, edi, ebx);
1276 __ CallRuntime(Runtime::kThrowNotDateError); 1276 __ CallRuntime(Runtime::kThrowNotDateError);
1277
1278 // It's far from obvious, but this final trailing instruction after the call
1279 // is required for StackFrame::LookupCode to work correctly. To illustrate
1280 // why: if call were the final instruction in the code object, then the pc
1281 // (== return address) would point beyond the code object when the stack is
1282 // traversed. When we then try to look up the code object through
1283 // StackFrame::LookupCode, we actually return the next code object that
1284 // happens to be on the same page in memory.
1285 // TODO(jgruber): A proper fix for this would be nice.
1286 __ nop();
1277 } 1287 }
1278 } 1288 }
1279 1289
1280 // static 1290 // static
1281 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1291 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1282 // ----------- S t a t e ------------- 1292 // ----------- S t a t e -------------
1283 // -- eax : argc 1293 // -- eax : argc
1284 // -- esp[0] : return address 1294 // -- esp[0] : return address
1285 // -- esp[4] : argArray 1295 // -- esp[4] : argArray
1286 // -- esp[8] : thisArg 1296 // -- esp[8] : thisArg
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 3065
3056 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3066 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3057 Generate_OnStackReplacementHelper(masm, true); 3067 Generate_OnStackReplacementHelper(masm, true);
3058 } 3068 }
3059 3069
3060 #undef __ 3070 #undef __
3061 } // namespace internal 3071 } // namespace internal
3062 } // namespace v8 3072 } // namespace v8
3063 3073
3064 #endif // V8_TARGET_ARCH_X87 3074 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/builtins/x64/builtins-x64.cc ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698