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

Side by Side Diff: src/builtins/ia32/builtins-ia32.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/arm64/builtins-arm64.cc ('k') | src/builtins/mips/builtins-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 } 1266 }
1267 __ ret(1 * kPointerSize); 1267 __ ret(1 * kPointerSize);
1268 1268
1269 // 3. Raise a TypeError if the receiver is not a date. 1269 // 3. Raise a TypeError if the receiver is not a date.
1270 __ bind(&receiver_not_date); 1270 __ bind(&receiver_not_date);
1271 { 1271 {
1272 FrameScope scope(masm, StackFrame::MANUAL); 1272 FrameScope scope(masm, StackFrame::MANUAL);
1273 __ Move(ebx, Immediate(0)); 1273 __ Move(ebx, Immediate(0));
1274 __ EnterBuiltinFrame(esi, edi, ebx); 1274 __ EnterBuiltinFrame(esi, edi, ebx);
1275 __ CallRuntime(Runtime::kThrowNotDateError); 1275 __ CallRuntime(Runtime::kThrowNotDateError);
1276
1277 // It's far from obvious, but this final trailing instruction after the call
1278 // is required for StackFrame::LookupCode to work correctly. To illustrate
1279 // why: if call were the final instruction in the code object, then the pc
1280 // (== return address) would point beyond the code object when the stack is
1281 // traversed. When we then try to look up the code object through
1282 // StackFrame::LookupCode, we actually return the next code object that
1283 // happens to be on the same page in memory.
1284 // TODO(jgruber): A proper fix for this would be nice.
1285 __ nop();
1276 } 1286 }
1277 } 1287 }
1278 1288
1279 // static 1289 // static
1280 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1290 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1281 // ----------- S t a t e ------------- 1291 // ----------- S t a t e -------------
1282 // -- eax : argc 1292 // -- eax : argc
1283 // -- esp[0] : return address 1293 // -- esp[0] : return address
1284 // -- esp[4] : argArray 1294 // -- esp[4] : argArray
1285 // -- esp[8] : thisArg 1295 // -- esp[8] : thisArg
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3030 3040
3031 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3041 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3032 Generate_OnStackReplacementHelper(masm, true); 3042 Generate_OnStackReplacementHelper(masm, true);
3033 } 3043 }
3034 3044
3035 #undef __ 3045 #undef __
3036 } // namespace internal 3046 } // namespace internal
3037 } // namespace v8 3047 } // namespace v8
3038 3048
3039 #endif // V8_TARGET_ARCH_IA32 3049 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/builtins/arm64/builtins-arm64.cc ('k') | src/builtins/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698