1.1 --- a/src/compiler/SemanticAnalysis.h Sat Dec 22 16:42:20 2012 -0800
1.2 +++ b/src/compiler/SemanticAnalysis.h Sat Dec 22 18:22:14 2012 -0800
1.3 @@ -88,6 +88,8 @@
1.4 Coerce_Assign
1.5 };
1.6
1.7 + void requireLifoStack();
1.8 + void visitLoopBody(Statement *stmt);
1.9 void visitForTest(Expression *expr,
1.10 BytecodeEmitter::Label *trueBranch,
1.11 BytecodeEmitter::Label *falseBranch,
1.12 @@ -114,6 +116,7 @@
1.13 BytecodeEmitter::Label *ct_;
1.14 LoopScope **prevp_;
1.15 LoopScope *prev_;
1.16 + bool usesLifoStack_;
1.17
1.18 public:
1.19 LoopScope(Scope *scope, BytecodeEmitter::Label *bk, BytecodeEmitter::Label *ct,
1.20 @@ -122,7 +125,8 @@
1.21 bk_(bk),
1.22 ct_(ct),
1.23 prevp_(prevp),
1.24 - prev_(*prevp)
1.25 + prev_(*prevp),
1.26 + usesLifoStack_(false)
1.27 {
1.28 *prevp_ = this;
1.29 }
1.30 @@ -141,6 +145,12 @@
1.31 Scope *scope() {
1.32 return scope_;
1.33 }
1.34 + void setUsesLifoStack() {
1.35 + usesLifoStack_ = true;
1.36 + }
1.37 + bool usesLifoStack() const {
1.38 + return usesLifoStack_;
1.39 + }
1.40 };
1.41
1.42 private: