| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } else if (FLAG_debug_code) { | 220 } else if (FLAG_debug_code) { |
| 221 Label done; | 221 Label done; |
| 222 __ JumpIfInNewSpace(rsi, rax, &done, Label::kNear); | 222 __ JumpIfInNewSpace(rsi, rax, &done, Label::kNear); |
| 223 __ Abort(kExpectedNewSpaceObject); | 223 __ Abort(kExpectedNewSpaceObject); |
| 224 __ bind(&done); | 224 __ bind(&done); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 PrepareForBailoutForId(BailoutId::Prologue(), NO_REGISTERS); |
| 231 // Function register is trashed in case we bailout here. But since that |
| 232 // could happen only when we allocate a context the value of |
| 233 // |function_in_register| is correct. |
| 234 |
| 230 // Possibly set up a local binding to the this function which is used in | 235 // Possibly set up a local binding to the this function which is used in |
| 231 // derived constructors with super calls. | 236 // derived constructors with super calls. |
| 232 Variable* this_function_var = scope()->this_function_var(); | 237 Variable* this_function_var = scope()->this_function_var(); |
| 233 if (this_function_var != nullptr) { | 238 if (this_function_var != nullptr) { |
| 234 Comment cmnt(masm_, "[ This function"); | 239 Comment cmnt(masm_, "[ This function"); |
| 235 if (!function_in_register) { | 240 if (!function_in_register) { |
| 236 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 241 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 237 // The write barrier clobbers register again, keep is marked as such. | 242 // The write barrier clobbers register again, keep it marked as such. |
| 238 } | 243 } |
| 239 SetVar(this_function_var, rdi, rbx, rdx); | 244 SetVar(this_function_var, rdi, rbx, rdx); |
| 240 } | 245 } |
| 241 | 246 |
| 242 Variable* new_target_var = scope()->new_target_var(); | 247 Variable* new_target_var = scope()->new_target_var(); |
| 243 if (new_target_var != nullptr) { | 248 if (new_target_var != nullptr) { |
| 244 Comment cmnt(masm_, "[ new.target"); | 249 Comment cmnt(masm_, "[ new.target"); |
| 245 | 250 |
| 246 __ movp(rax, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 251 __ movp(rax, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
| 247 Label non_adaptor_frame; | 252 Label non_adaptor_frame; |
| (...skipping 5010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5258 Assembler::target_address_at(call_target_address, | 5263 Assembler::target_address_at(call_target_address, |
| 5259 unoptimized_code)); | 5264 unoptimized_code)); |
| 5260 return OSR_AFTER_STACK_CHECK; | 5265 return OSR_AFTER_STACK_CHECK; |
| 5261 } | 5266 } |
| 5262 | 5267 |
| 5263 | 5268 |
| 5264 } // namespace internal | 5269 } // namespace internal |
| 5265 } // namespace v8 | 5270 } // namespace v8 |
| 5266 | 5271 |
| 5267 #endif // V8_TARGET_ARCH_X64 | 5272 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |