Index: src/full-codegen.h |
diff --git a/src/full-codegen.h b/src/full-codegen.h |
index 28be00855ec28a8053c2356d512abd4f7f26478b..0e70eb79ef87b7e71570922fc4550c4a5ddfac6a 100644 |
--- a/src/full-codegen.h |
+++ b/src/full-codegen.h |
@@ -191,6 +191,24 @@ class FullCodeGenerator: public AstVisitor { |
Label continue_label_; |
}; |
+ // A nested block statement. |
+ class NestedBlock : public Breakable { |
+ public: |
+ explicit NestedBlock(FullCodeGenerator* codegen, Block* block) |
Kevin Millikin (Chromium)
2011/09/02 15:17:44
No need for explicit for two argument constructors
Steven
2011/09/05 08:54:50
Done.
|
+ : Breakable(codegen, block), block_(block) { |
+ } |
+ virtual ~NestedBlock() {} |
+ |
+ virtual NestedStatement* Exit(int* stack_depth, int* context_length) { |
+ if (block_->block_scope() != NULL) { |
+ ++(*context_length); |
+ } |
+ return previous_; |
+ }; |
+ private: |
+ Block* block_; |
Kevin Millikin (Chromium)
2011/09/02 15:17:44
This class doesn't need to store the block since t
Steven
2011/09/05 08:54:50
Done.
|
+ }; |
+ |
// The try block of a try/catch statement. |
class TryCatch : public NestedStatement { |
public: |