diff -r ce072f38628c -r fb3cd08bc7fb src/compiler/SemanticAnalysis.h --- a/src/compiler/SemanticAnalysis.h Sat Dec 22 16:42:20 2012 -0800 +++ b/src/compiler/SemanticAnalysis.h Sat Dec 22 18:22:14 2012 -0800 @@ -88,6 +88,8 @@ Coerce_Assign }; + void requireLifoStack(); + void visitLoopBody(Statement *stmt); void visitForTest(Expression *expr, BytecodeEmitter::Label *trueBranch, BytecodeEmitter::Label *falseBranch, @@ -114,6 +116,7 @@ BytecodeEmitter::Label *ct_; LoopScope **prevp_; LoopScope *prev_; + bool usesLifoStack_; public: LoopScope(Scope *scope, BytecodeEmitter::Label *bk, BytecodeEmitter::Label *ct, @@ -122,7 +125,8 @@ bk_(bk), ct_(ct), prevp_(prevp), - prev_(*prevp) + prev_(*prevp), + usesLifoStack_(false) { *prevp_ = this; } @@ -141,6 +145,12 @@ Scope *scope() { return scope_; } + void setUsesLifoStack() { + usesLifoStack_ = true; + } + bool usesLifoStack() const { + return usesLifoStack_; + } }; private: