OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |