                 ir.createLoad null_alloca, "nullload"
                 
         loadUndefinedEjsValue: ->
-                return ir.createLoad(@currentFunction.undef_alloca, "undefload") if @currentFunction.undef_alloca?
-                if @currentFunction.undef_alloca?
-                        undef_alloca = @currentFunction.undef_alloca
-                else
-                        undef_alloca = @createAlloca @currentFunction, types.EjsValue, "undef_alloca"
+                undef_alloca = @createAlloca @currentFunction, types.EjsValue, "undef_alloca"
                 @storeUndefined undef_alloca
-                if not @currentFunction.undef_alloca?
-                        @currentFunction.undef_alloca = undef_alloca
                 ir.createLoad undef_alloca, "undefload"
 
         storeUndefined: (alloca, name) ->

                if iife_dest_bb
                        ir.createBr iife_dest_bb
                        ir.setInsertPoint iife_dest_bb
                        rv = @createLoad (@findIdentifierInScope n.ejs_iife_rv.name), "%iife_rv_load"
                        rv
                else
                        n

                        pname = @getAtom prop.name

                        if @options.record_types
                                @createCall @ejs_runtime.record_getprop, [consts.int32(@genRecordId()), obj, pname], ""

                        @createCall @ejs_runtime.object_getprop, [obj, pname], "getprop_#{prop.name}", canThrow
                

        visitOrNull:      (n) -> @visit(n) || @loadNullEjsValue()
        visitOrUndefined: (n) -> @visit(n) || @loadUndefinedEjsValue()
        
        visitProgram: (n) ->
                # by the time we make it here the program has been
