         # this method assumes it's called in an opencoded context
         emitLoadEjsFunctionClosureFunc: (closure) ->
                 if @options.target_pointer_size is 64
-                        func_slot_gep = ir.createInBoundsGetElementPointer closure, [consts.int64 1], "func_slot_gep"
+                        func_slot_gep = ir.createInBoundsGetElementPointer closure, [consts.int64(1)], "func_slot_gep"
                         func_slot = ir.createBitCast func_slot_gep, types.EjsClosureFunc.pointerTo(), "func_slot"
                         ir.createLoad func_slot, "func_load"
                 else

                n.formal_params = n.params

                n.params = ({ type: _Identifier, name: param.name, llvm_type: param.llvm_type } for param in @abi.ejs_params)
                n.params[1].name = env_name

                # create the llvm IR function using our platform calling convention
                n.ir_func = types.takes_builtins @abi.createFunction @module, n.ir_name, @abi.ejs_return_type, (param.llvm_type for param in n.params)

        visitContinue: (n) ->
                return ExitableScope.scopeStack.exitFore n.label?.name

        createEjsvalCmpEq: (x, y) ->
                x_alloc = @createAlloca @currentFunction, types.EjsValue, "x_alloca"
                ir.createStore x, x_alloc
                x_ptr = ir.createBitCast x_alloc, types.int64.pointerTo(), "x_ptr"
