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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 329 matching lines...) Loading... |
340 if (scope()->HasIllegalRedeclaration()) { | 340 if (scope()->HasIllegalRedeclaration()) { |
341 Comment cmnt(masm_, "[ Declarations"); | 341 Comment cmnt(masm_, "[ Declarations"); |
342 scope()->VisitIllegalRedeclaration(this); | 342 scope()->VisitIllegalRedeclaration(this); |
343 | 343 |
344 } else { | 344 } else { |
345 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); | 345 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
346 { Comment cmnt(masm_, "[ Declarations"); | 346 { Comment cmnt(masm_, "[ Declarations"); |
347 VisitDeclarations(scope()->declarations()); | 347 VisitDeclarations(scope()->declarations()); |
348 } | 348 } |
349 | 349 |
| 350 // Assert that the declarations do not use ICs. Otherwise the debugger |
| 351 // won't be able to redirect a PC at an IC to the correct IC in newly |
| 352 // recompiled code. |
| 353 DCHECK_EQ(0, ic_total_count_); |
| 354 |
350 { Comment cmnt(masm_, "[ Stack check"); | 355 { Comment cmnt(masm_, "[ Stack check"); |
351 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 356 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
352 Label ok; | 357 Label ok; |
353 ExternalReference stack_limit | 358 ExternalReference stack_limit |
354 = ExternalReference::address_of_stack_limit(isolate()); | 359 = ExternalReference::address_of_stack_limit(isolate()); |
355 __ cmp(esp, Operand::StaticVariable(stack_limit)); | 360 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
356 __ j(above_equal, &ok, Label::kNear); | 361 __ j(above_equal, &ok, Label::kNear); |
357 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 362 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |
358 __ bind(&ok); | 363 __ bind(&ok); |
359 } | 364 } |
(...skipping 4972 matching lines...) Loading... |
5332 Assembler::target_address_at(call_target_address, | 5337 Assembler::target_address_at(call_target_address, |
5333 unoptimized_code)); | 5338 unoptimized_code)); |
5334 return OSR_AFTER_STACK_CHECK; | 5339 return OSR_AFTER_STACK_CHECK; |
5335 } | 5340 } |
5336 | 5341 |
5337 | 5342 |
5338 } // namespace internal | 5343 } // namespace internal |
5339 } // namespace v8 | 5344 } // namespace v8 |
5340 | 5345 |
5341 #endif // V8_TARGET_ARCH_X87 | 5346 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |