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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 if (scope()->HasIllegalRedeclaration()) { | 343 if (scope()->HasIllegalRedeclaration()) { |
344 Comment cmnt(masm_, "[ Declarations"); | 344 Comment cmnt(masm_, "[ Declarations"); |
345 scope()->VisitIllegalRedeclaration(this); | 345 scope()->VisitIllegalRedeclaration(this); |
346 | 346 |
347 } else { | 347 } else { |
348 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); | 348 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
349 { Comment cmnt(masm_, "[ Declarations"); | 349 { Comment cmnt(masm_, "[ Declarations"); |
350 VisitDeclarations(scope()->declarations()); | 350 VisitDeclarations(scope()->declarations()); |
351 } | 351 } |
352 | 352 |
| 353 // Assert that the declarations do not use ICs. Otherwise the debugger |
| 354 // won't be able to redirect a PC at an IC to the correct IC in newly |
| 355 // recompiled code. |
| 356 DCHECK_EQ(0, ic_total_count_); |
| 357 |
353 { Comment cmnt(masm_, "[ Stack check"); | 358 { Comment cmnt(masm_, "[ Stack check"); |
354 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 359 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
355 Label ok; | 360 Label ok; |
356 ExternalReference stack_limit | 361 ExternalReference stack_limit |
357 = ExternalReference::address_of_stack_limit(isolate()); | 362 = ExternalReference::address_of_stack_limit(isolate()); |
358 __ cmp(esp, Operand::StaticVariable(stack_limit)); | 363 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
359 __ j(above_equal, &ok, Label::kNear); | 364 __ j(above_equal, &ok, Label::kNear); |
360 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 365 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |
361 __ bind(&ok); | 366 __ bind(&ok); |
362 } | 367 } |
(...skipping 4978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5341 Assembler::target_address_at(call_target_address, | 5346 Assembler::target_address_at(call_target_address, |
5342 unoptimized_code)); | 5347 unoptimized_code)); |
5343 return OSR_AFTER_STACK_CHECK; | 5348 return OSR_AFTER_STACK_CHECK; |
5344 } | 5349 } |
5345 | 5350 |
5346 | 5351 |
5347 } // namespace internal | 5352 } // namespace internal |
5348 } // namespace v8 | 5353 } // namespace v8 |
5349 | 5354 |
5350 #endif // V8_TARGET_ARCH_IA32 | 5355 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |