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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 1214483008: Fix clobbered register when setting this_function variable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed think'o. Created 5 years, 5 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/arm64/full-codegen-arm64.cc ('k') | src/mips/full-codegen-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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 } 233 }
234 } 234 }
235 } 235 }
236 236
237 // Possibly set up a local binding to the this function which is used in 237 // Possibly set up a local binding to the this function which is used in
238 // derived constructors with super calls. 238 // derived constructors with super calls.
239 Variable* this_function_var = scope()->this_function_var(); 239 Variable* this_function_var = scope()->this_function_var();
240 if (this_function_var != nullptr) { 240 if (this_function_var != nullptr) {
241 Comment cmnt(masm_, "[ This function"); 241 Comment cmnt(masm_, "[ This function");
242 if (!function_in_register) {
243 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
244 // The write barrier clobbers register again, keep is marked as such.
245 }
242 SetVar(this_function_var, edi, ebx, edx); 246 SetVar(this_function_var, edi, ebx, edx);
243 } 247 }
244 248
245 Variable* new_target_var = scope()->new_target_var(); 249 Variable* new_target_var = scope()->new_target_var();
246 if (new_target_var != nullptr) { 250 if (new_target_var != nullptr) {
247 Comment cmnt(masm_, "[ new.target"); 251 Comment cmnt(masm_, "[ new.target");
248 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); 252 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
249 Label non_adaptor_frame; 253 Label non_adaptor_frame;
250 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset), 254 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset),
251 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 255 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
(...skipping 5242 matching lines...) Expand 10 before | Expand all | Expand 10 after
5494 Assembler::target_address_at(call_target_address, 5498 Assembler::target_address_at(call_target_address,
5495 unoptimized_code)); 5499 unoptimized_code));
5496 return OSR_AFTER_STACK_CHECK; 5500 return OSR_AFTER_STACK_CHECK;
5497 } 5501 }
5498 5502
5499 5503
5500 } // namespace internal 5504 } // namespace internal
5501 } // namespace v8 5505 } // namespace v8
5502 5506
5503 #endif // V8_TARGET_ARCH_IA32 5507 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698