                         pname = @getAtom prop.name
 
                         if @options.record_types
-                                @createCall @ejs_runtime.record_getprop, [(consts.int32 @genRecordId()), obj, pname], ""
+                                @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()
+        visitOrNull:      (n) -> @visit(n) || @loadNullEjsValue()
+        visitOrUndefined: (n) -> @visit(n) || @loadUndefinedEjsValue()
         
         visitProgram: (n) ->
                 # by the time we make it here the program has been

                if @iifeStack.top.iife_rv?
                        # if we're inside an IIFE, convert the return statement into a store to the iife_rv alloca + a branch to the iife's dest bb
                        if n.argument?
                                ir.createStore (@visit n.argument), @findIdentifierInScope @iifeStack.top.iife_rv.name
                        ir.createBr @iifeStack.top.iife_dest_bb
                else
                        # otherwise generate an llvm IR ret

        handleSetGlobal: (exp, opencode) ->
                if @options.frozen_global
                        throw new SyntaxError "cannot set global property '#{exp.arguments[0].name}' when using --frozen-global"

                pname = exp.arguments[0].name
                patom = @getAtom pname
                value = @visit exp.arguments[1]

                @createCall @ejs_runtime.global_setprop, [patom, value], "globalpropstore_#{pname}"

        # this method assumes it's called in an opencoded context
        emitEjsvalTo: (val, type, prefix) ->
