Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index d810bb3dc0823a661d740708408c34e98462e332..53ace82fe7a28b7bb28b3ba60708b2dfdc5c5070 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -96,11 +96,6 @@ void BreakableStatementChecker::VisitWithStatement(WithStatement* stmt) { |
} |
-void BreakableStatementChecker::VisitExitContextStatement( |
- ExitContextStatement* stmt) { |
-} |
- |
- |
void BreakableStatementChecker::VisitSwitchStatement(SwitchStatement* stmt) { |
// Switch statements breakable if the tag expression is. |
Visit(stmt->tag()); |
@@ -989,17 +984,6 @@ void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) { |
} |
-void FullCodeGenerator::VisitExitContextStatement(ExitContextStatement* stmt) { |
- Comment cmnt(masm_, "[ ExitContextStatement"); |
- SetStatementPosition(stmt); |
- |
- // Pop context. |
- LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
- // Update local stack frame context field. |
- StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
-} |
- |
- |
void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) { |
Comment cmnt(masm_, "[ DoWhileStatement"); |
SetStatementPosition(stmt); |
@@ -1147,6 +1131,9 @@ void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) { |
{ WithOrCatch body(this); |
Visit(stmt->catch_block()); |
} |
+ // Restore the context. |
+ LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
+ StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
scope_ = saved_scope; |
__ jmp(&done); |