Index: src/fast-codegen.cc |
diff --git a/src/fast-codegen.cc b/src/fast-codegen.cc |
index c63522455306c95566300f1d7f661b4c9d1861e7..7f75ef14abc9cfd64bc8377707788338482269d5 100644 |
--- a/src/fast-codegen.cc |
+++ b/src/fast-codegen.cc |
@@ -337,12 +337,34 @@ void FastCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { |
void FastCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) { |
- UNREACHABLE(); |
+ Comment cmnt(masm_, "[ WithEnterStatement"); |
+ if (FLAG_debug_info) { |
Kevin Millikin (Chromium)
2009/12/14 16:35:47
SetStatementPosition(stmt)?
Lasse Reichstein
2009/12/16 13:40:31
Should have known it would be in the fast codegen
|
+ CodeGenerator::RecordPositions(masm(), stmt->statement_pos()); |
+ } |
+ |
+ Visit(stmt->expression()); |
+ if (stmt->is_catch_block()) { |
+ __ CallRuntime(Runtime::kPushCatchContext, 1); |
+ } else { |
+ __ CallRuntime(Runtime::kPushContext, 1); |
+ } |
+ // Both runtime calls return the new context in both the context and the |
+ // result registers. |
+ |
+ // Update local stack frame context field. |
+ StoreFrameField(StandardFrameConstants::kContextOffset, context_register()); |
} |
void FastCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) { |
- UNREACHABLE(); |
+ Comment cmnt(masm_, "[ WithExitStatement"); |
+ if (FLAG_debug_info) { |
Kevin Millikin (Chromium)
2009/12/14 16:35:47
Same.
Lasse Reichstein
2009/12/16 13:40:31
Fixed.
|
+ CodeGenerator::RecordPositions(masm(), stmt->statement_pos()); |
+ } |
+ // Pop context. |
+ LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
+ // Update local stack frame context field. |
+ StoreFrameField(StandardFrameConstants::kContextOffset, context_register()); |
} |