                                 
                 ir.createBr forin_bb
 
-                scope = new LoopExitableScope n.label, forin_bb, merge_bb
-                scope.enter()
-
-                @doInsideBlock forin_bb, =>
-                        moreleft = @createCall @ejs_runtime.prop_iterator_next, [iterator, consts.true()], "moreleft"
-                        cmp = ir.createICmpEq moreleft, consts.false(), "cmpmoreleft"
-                        ir.createCondBr cmp, merge_bb, body_bb
-
-                @doInsideBlock body_bb, =>
-                        current = @createCall @ejs_runtime.prop_iterator_current, [iterator], "iterator_current"
-                        @storeValueInDest current, lhs
-                        @visit n.body
-                        ir.createBr forin_bb
-
-                scope.leave()
-
+                @doInsideExitableScope (new LoopExitableScope n.label, forin_bb, merge_bb), =>
+                        # forin_bb:
+                        #     moreleft = prop_iterator_next (iterator, true)
+                        #     if moreleft === false
+                        #         goto merge_bb
+                        #     else
+                        #         goto body_bb
+                        # 
+                        @doInsideBBlock forin_bb, =>
+                                moreleft = @createCall @ejs_runtime.prop_iterator_next, [iterator, consts.true()], "moreleft"
+                                cmp = ir.createICmpEq moreleft, consts.false(), "cmpmoreleft"
+                                ir.createCondBr cmp, merge_bb, body_bb
+
+                        # body_bb:
+                        #     current = prop_iteratorcurrent (iterator)
+                        #     *lhs = current
+                        #      <body>
+                        #     goto forin_bb
+                        @doInsideBBlock body_bb, =>
+                                current = @createCall @ejs_runtime.prop_iterator_current, [iterator], "iterator_current"
+                                @storeValueInDest current, lhs
+                                @visit n.body
+                                ir.createBr forin_bb
+
+                # merge_bb:
+                # 
                 ir.setInsertPoint merge_bb
                 merge_bb
                 

                right_alloca = @createAlloca @currentFunction, types.EjsValue, "binop_right"
                right_visited = @visit n.right
                ir.createStore right_visited, right_alloca

                if n.left.is_constant? and n.right.is_constant?
                        console.warn "we could totally evaluate this at compile time, yo"

                if @options.record_types
                        @createCall @ejs_runtime.record_binop, [(consts.int32 @genRecordId()), (consts.string ir, n.operator), (@createLoad left_alloca, "binop_left_load"), (@createLoad right_alloca, "binop_right_load")], ""

                        cmp = ir.createICmpUGt candidate, (consts.int64_lowhi 0xfffbffff, 0xffffffff), "cmpresult"
                        ir.createCondBr cmp, is_object_bb, failure_bb

                        @doInsideBBlock is_object_bb, =>
                                obj = @emitEjsvalTo candidate, types.EjsObject.pointerTo(), "obj"
                                specops_load = @emitLoadSpecops obj
                                cmp = ir.createICmpEq specops_load, @ejs_runtime.function_specops, "function_specops_cmp"
                                ir.createCondBr cmp, success_bb, failure_bb

                        @doInsideBBlock success_bb, =>
                                ir.createStore (@loadBoolEjsValue true), typeofIsFunction_alloca, "store_typeof"
                                ir.createBr merge_bb
                                
                        @doInsideBBlock failure_bb, =>
                                ir.createStore (@loadBoolEjsValue false), typeofIsFunction_alloca, "store_typeof"
                                ir.createBr merge_bb

