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 function_in_register = true; | |
241 } | |
242 SetVar(this_function_var, rdi, rbx, rdx); | 238 SetVar(this_function_var, rdi, rbx, rdx); |
243 } | 239 } |
244 | 240 |
245 Variable* new_target_var = scope()->new_target_var(); | 241 Variable* new_target_var = scope()->new_target_var(); |
246 if (new_target_var != nullptr) { | 242 if (new_target_var != nullptr) { |
247 Comment cmnt(masm_, "[ new.target"); | 243 Comment cmnt(masm_, "[ new.target"); |
248 // new.target is parameter -2. | 244 // new.target is parameter -2. |
249 int offset = 2 * kPointerSize + kFPOnStackSize + kPCOnStackSize + | 245 int offset = 2 * kPointerSize + kFPOnStackSize + kPCOnStackSize + |
250 (info_->scope()->num_parameters() - 1) * kPointerSize; | 246 (info_->scope()->num_parameters() - 1) * kPointerSize; |
251 __ movp(rax, Operand(rbp, offset)); | 247 __ movp(rax, Operand(rbp, offset)); |
(...skipping 5233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5485 Assembler::target_address_at(call_target_address, | 5481 Assembler::target_address_at(call_target_address, |
5486 unoptimized_code)); | 5482 unoptimized_code)); |
5487 return OSR_AFTER_STACK_CHECK; | 5483 return OSR_AFTER_STACK_CHECK; |
5488 } | 5484 } |
5489 | 5485 |
5490 | 5486 |
5491 } // namespace internal | 5487 } // namespace internal |
5492 } // namespace v8 | 5488 } // namespace v8 |
5493 | 5489 |
5494 #endif // V8_TARGET_ARCH_X64 | 5490 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |