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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } else if (FLAG_debug_code) { | 225 } else if (FLAG_debug_code) { |
226 Label done; | 226 Label done; |
227 __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); | 227 __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); |
228 __ Abort(kExpectedNewSpaceObject); | 228 __ Abort(kExpectedNewSpaceObject); |
229 __ bind(&done); | 229 __ bind(&done); |
230 } | 230 } |
231 } | 231 } |
232 } | 232 } |
233 } | 233 } |
234 | 234 |
| 235 PrepareForBailoutForId(BailoutId::Prologue(), NO_REGISTERS); |
| 236 // Function register is trashed in case we bailout here. But since that |
| 237 // could happen only when we allocate a context the value of |
| 238 // |function_in_register| is correct. |
| 239 |
235 // Possibly set up a local binding to the this function which is used in | 240 // Possibly set up a local binding to the this function which is used in |
236 // derived constructors with super calls. | 241 // derived constructors with super calls. |
237 Variable* this_function_var = scope()->this_function_var(); | 242 Variable* this_function_var = scope()->this_function_var(); |
238 if (this_function_var != nullptr) { | 243 if (this_function_var != nullptr) { |
239 Comment cmnt(masm_, "[ This function"); | 244 Comment cmnt(masm_, "[ This function"); |
240 if (!function_in_register) { | 245 if (!function_in_register) { |
241 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 246 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
242 // The write barrier clobbers register again, keep is marked as such. | 247 // The write barrier clobbers register again, keep it marked as such. |
243 } | 248 } |
244 SetVar(this_function_var, edi, ebx, edx); | 249 SetVar(this_function_var, edi, ebx, edx); |
245 } | 250 } |
246 | 251 |
247 Variable* new_target_var = scope()->new_target_var(); | 252 Variable* new_target_var = scope()->new_target_var(); |
248 if (new_target_var != nullptr) { | 253 if (new_target_var != nullptr) { |
249 Comment cmnt(masm_, "[ new.target"); | 254 Comment cmnt(masm_, "[ new.target"); |
250 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | 255 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
251 Label non_adaptor_frame; | 256 Label non_adaptor_frame; |
252 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset), | 257 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset), |
(...skipping 4996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5249 Assembler::target_address_at(call_target_address, | 5254 Assembler::target_address_at(call_target_address, |
5250 unoptimized_code)); | 5255 unoptimized_code)); |
5251 return OSR_AFTER_STACK_CHECK; | 5256 return OSR_AFTER_STACK_CHECK; |
5252 } | 5257 } |
5253 | 5258 |
5254 | 5259 |
5255 } // namespace internal | 5260 } // namespace internal |
5256 } // namespace v8 | 5261 } // namespace v8 |
5257 | 5262 |
5258 #endif // V8_TARGET_ARCH_IA32 | 5263 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |