| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index e5375fc3ae8b4750b6c47a45346f08abb9c5c2bc..5e3cc2995cfb37970b41d646a5623c3c86dffbcb 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -35,6 +35,7 @@
|
| #include "macro-assembler.h"
|
| #include "prettyprinter.h"
|
| #include "scopes.h"
|
| +#include "scopeinfo.h"
|
| #include "stub-cache.h"
|
|
|
| namespace v8 {
|
| @@ -847,8 +848,19 @@ void FullCodeGenerator::VisitBlock(Block* stmt) {
|
| Breakable nested_statement(this, stmt);
|
| SetStatementPosition(stmt);
|
|
|
| + Scope* saved_scope = scope();
|
| + if (stmt->block_scope() != NULL) {
|
| + Comment cmnt(masm_, "[ Extend block context");
|
| + scope_ = stmt->block_scope();
|
| + __ Push(scope_->GetSerializedScopeInfo());
|
| + PushFunctionArgumentForContextAllocation();
|
| + __ CallRuntime(Runtime::kPushBlockContext, 2);
|
| + StoreToFrameField(StandardFrameConstants::kContextOffset,
|
| + context_register());
|
| + }
|
| PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
|
| VisitStatements(stmt->statements());
|
| + scope_ = saved_scope;
|
| __ bind(nested_statement.break_target());
|
| PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS);
|
| }
|
|
|