           (when variadic
             (println (str name ".cljs$lang$maxFixedArity = " max-fixed-arity ";"))
             (println (str name ".cljs$lang$applyTo = " (some #(let [[n m] %] (when (:variadic m) n)) ms) ".cljs$lang$applyTo;")))
+          (when has-name?
+            (doseq [[n meth] ms]
+              (let [c (count (:params meth))]
+               (println (str name ".__" c " = " n ";")))))
           (println (str "return " name ";"))
           (println "})()")))
       (when loop-locals

                (let [arities (map #(-> % :params count) methods)]
                  (if (some #{arity} arities)
                    (update-in f [:info :name]
                      (fn [name] (symbol (str name "__" arity))))
                    f))))
            f)]
    (emit-wrap env

          (doseq [[n meth] ms]
            (println (str "var " n " = " (with-out-str (if (:variadic meth)
                                                           (emit-variadic-fn-method meth)
                                                           (emit-fn-method meth))) ";")))
          (println (str name " = function(" (comma-sep (if variadic
                                                         (concat (butlast maxparams) ['var_args])
                                                         maxparams)) "){"))
