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

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

Issue 1185703002: Fix clobbered register when setting this_function variable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ARM64 compilation. Created 5 years, 6 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/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-498022.js » ('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_X87 7 #if V8_TARGET_ARCH_X87
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 } 230 }
231 } 231 }
232 } 232 }
233 233
234 // Possibly set up a local binding to the this function which is used in 234 // Possibly set up a local binding to the this function which is used in
235 // derived constructors with super calls. 235 // derived constructors with super calls.
236 Variable* this_function_var = scope()->this_function_var(); 236 Variable* this_function_var = scope()->this_function_var();
237 if (this_function_var != nullptr) { 237 if (this_function_var != nullptr) {
238 Comment cmnt(masm_, "[ This function"); 238 Comment cmnt(masm_, "[ This function");
239 if (!function_in_register) {
240 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
241 function_in_register = true;
242 }
239 SetVar(this_function_var, edi, ebx, edx); 243 SetVar(this_function_var, edi, ebx, edx);
240 } 244 }
241 245
242 Variable* new_target_var = scope()->new_target_var(); 246 Variable* new_target_var = scope()->new_target_var();
243 if (new_target_var != nullptr) { 247 if (new_target_var != nullptr) {
244 Comment cmnt(masm_, "[ new.target"); 248 Comment cmnt(masm_, "[ new.target");
245 // new.target is parameter -2. 249 // new.target is parameter -2.
246 int offset = 2 * kPointerSize + kFPOnStackSize + kPCOnStackSize + 250 int offset = 2 * kPointerSize + kFPOnStackSize + kPCOnStackSize +
247 (info_->scope()->num_parameters() - 1) * kPointerSize; 251 (info_->scope()->num_parameters() - 1) * kPointerSize;
248 __ mov(eax, Operand(ebp, offset)); 252 __ mov(eax, Operand(ebp, offset));
(...skipping 5202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5451 Assembler::target_address_at(call_target_address, 5455 Assembler::target_address_at(call_target_address,
5452 unoptimized_code)); 5456 unoptimized_code));
5453 return OSR_AFTER_STACK_CHECK; 5457 return OSR_AFTER_STACK_CHECK;
5454 } 5458 }
5455 5459
5456 5460
5457 } // namespace internal 5461 } // namespace internal
5458 } // namespace v8 5462 } // namespace v8
5459 5463
5460 #endif // V8_TARGET_ARCH_X87 5464 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-498022.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698