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

Side by Side Diff: src/x64/full-codegen-x64.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/ppc/full-codegen-ppc.cc ('k') | src/x87/full-codegen-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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 } 229 }
230 } 230 }
231 } 231 }
232 232
233 // Possibly set up a local binding to the this function which is used in 233 // Possibly set up a local binding to the this function which is used in
234 // derived constructors with super calls. 234 // derived constructors with super calls.
235 Variable* this_function_var = scope()->this_function_var(); 235 Variable* this_function_var = scope()->this_function_var();
236 if (this_function_var != nullptr) { 236 if (this_function_var != nullptr) {
237 Comment cmnt(masm_, "[ This function"); 237 Comment cmnt(masm_, "[ This function");
238 if (!function_in_register) {
239 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
240 // The write barrier clobbers register again, keep is marked as such.
241 }
238 SetVar(this_function_var, rdi, rbx, rdx); 242 SetVar(this_function_var, rdi, rbx, rdx);
239 } 243 }
240 244
241 Variable* new_target_var = scope()->new_target_var(); 245 Variable* new_target_var = scope()->new_target_var();
242 if (new_target_var != nullptr) { 246 if (new_target_var != nullptr) {
243 Comment cmnt(masm_, "[ new.target"); 247 Comment cmnt(masm_, "[ new.target");
244 248
245 __ movp(rax, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); 249 __ movp(rax, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
246 Label non_adaptor_frame; 250 Label non_adaptor_frame;
247 __ Cmp(Operand(rax, StandardFrameConstants::kContextOffset), 251 __ Cmp(Operand(rax, StandardFrameConstants::kContextOffset),
(...skipping 5267 matching lines...) Expand 10 before | Expand all | Expand 10 after
5515 Assembler::target_address_at(call_target_address, 5519 Assembler::target_address_at(call_target_address,
5516 unoptimized_code)); 5520 unoptimized_code));
5517 return OSR_AFTER_STACK_CHECK; 5521 return OSR_AFTER_STACK_CHECK;
5518 } 5522 }
5519 5523
5520 5524
5521 } // namespace internal 5525 } // namespace internal
5522 } // namespace v8 5526 } // namespace v8
5523 5527
5524 #endif // V8_TARGET_ARCH_X64 5528 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698