| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index 6ae927c9018a16a5462f2448f5ae79bdc3e997a1..3c07c683f2b83e8c44e211be6e3f61da04197e05 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -1052,7 +1052,9 @@ void FullCodeGenerator::VisitBlock(Block* stmt) {
|
|
|
| Scope* saved_scope = scope();
|
| // Push a block context when entering a block with block scoped variables.
|
| - if (stmt->scope() != NULL) {
|
| + if (stmt->scope() == NULL) {
|
| + PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
|
| + } else {
|
| scope_ = stmt->scope();
|
| ASSERT(!scope_->is_module_scope());
|
| { Comment cmnt(masm_, "[ Extend block context");
|
| @@ -1063,17 +1065,17 @@ void FullCodeGenerator::VisitBlock(Block* stmt) {
|
| // Replace the context stored in the frame.
|
| StoreToFrameField(StandardFrameConstants::kContextOffset,
|
| context_register());
|
| + PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
|
| }
|
| { Comment cmnt(masm_, "[ Declarations");
|
| VisitDeclarations(scope_->declarations());
|
| + PrepareForBailoutForId(stmt->DeclsId(), NO_REGISTERS);
|
| }
|
| }
|
|
|
| - PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
|
| VisitStatements(stmt->statements());
|
| scope_ = saved_scope;
|
| __ bind(nested_block.break_label());
|
| - PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
|
|
| // Pop block context if necessary.
|
| if (stmt->scope() != NULL) {
|
| @@ -1082,6 +1084,7 @@ void FullCodeGenerator::VisitBlock(Block* stmt) {
|
| StoreToFrameField(StandardFrameConstants::kContextOffset,
|
| context_register());
|
| }
|
| + PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
| }
|
|
|
|
|
|
|