 
         visitFunction: (n) ->
                 console.warn "        function #{n.ir_name} at line #{n.loc?.start.line}"
-                        
+                
                 # save off the insert point so we can get back to it after generating this function
-                insertBlock = llvm.IRBuilder.getInsertBlock()
+                insertBlock = irbuilder.getInsertBlock()
 
                 for param in n.params
                         debug.log param.type

                                        # if the alloca is newly allocated.
                                        if new_allocas[i]
                                                initializer = @visitOrUndefined n.declarations[i].init
                                                llvm.IRBuilder.createStore initializer, allocas[i]
                                else
                                        initializer = @visitOrUndefined n.declarations[i].init
                                        llvm.IRBuilder.createStore initializer, allocas[i]
                else if n.kind is "const"
                        for i in [0...n.declarations.length]
                                u = n.declarations[i]

                                

                # reinstate the IRBuilder to its previous insert point so we can insert the actual initializations
                irbuilder.setInsertPoint saved_insert_point

                { allocas: allocas, new_allocas: new_allocas }

        createPropertyStore: (obj,prop,rhs,computed) ->
                if computed
                        # we store obj[prop], prop can be any value
                        irbuilder.createCall @ejs.object_setprop, [obj, (@visit prop), rhs], "propstore_computed"
                else
                        # we store obj.prop, prop is an id
                        if prop.type is syntax.Identifier
