 
                 ir.createBr while_bb
 
-                @doInsideBlock while_bb, =>
+                @doInsideBBlock while_bb, =>
                         @generateCondBr n.test, body_bb, merge_bb
 
-                scope = new LoopExitableScope n.label, while_bb, merge_bb
-                scope.enter()
-                
-                @doInsideBlock body_bb, =>
-                        @visit n.body
-                        ir.createBr while_bb
-
-                scope.leave()
+                @doInsideExitableScope (new LoopExitableScope n.label, while_bb, merge_bb), =>
+                        @doInsideBBlock body_bb, =>
+                                @visit n.body
+                                ir.createBr while_bb
                                 
                 ir.setInsertPoint merge_bb
                 merge_bb

                                        switch_stmt.addCase (consts.int32 ExitableScope.REASON_RETURN), return_tramp

                                falloff_tramp = new llvm.BasicBlock "falloff_tramp", insertFunc
                                @doInsideBlock falloff_tramp, =>
                                        ir.createBr merge_block
                                switch_stmt.addCase (consts.int32 TryExitableScope.REASON_FALLOFF_TRY), falloff_tramp

                                for s in [0...scope.destinations.length]
                                        dest_tramp = new llvm.BasicBlock "dest_tramp", insertFunc
                                        dest = scope.destinations[s]
                                        @doInsideBlock dest_tramp, =>
                                                if dest.reason == TryExitableScope.REASON_BREAK
                                                        dest.scope.exitAft true
                                                else if dest.reason == TryExitableScope.REASON_CONTINUE


                @generateCondBr n.test, then_bb, (if else_bb? then else_bb else merge_bb)

                @doInsideBBlock then_bb, =>
                        then_val = @visit n.consequent
                        ir.createStore then_val, cond_val if load_result
                        ir.createBr merge_bb

                if n.alternate?
                        @doInsideBBlock else_bb, =>
                                else_val = @visit n.alternate
                                ir.createStore else_val, cond_val if load_result
                                ir.createBr merge_bb
