   (interpose "," xs))
 
 (defn- escape-char [^Character c]
-  (let [cp (.hashCode c)]
+  (let [cp #?(:clj (.hashCode c)
+              :cljs (gstring/hashCode c))]
     (case cp
       ; Handle printable escapes before ASCII
       34 "\\\""

      (emitln "if(!COMPILED) " loaded-libs " = cljs.core.set();"))
    (doseq [lib (remove (set (vals seen)) (distinct (vals libs)))]
      (cond
        (ana/foreign-dep? lib)
        (let [{:keys [target optimizations]} (get @env/*compiler* :options)]
          ;; we only load foreign libraries under optimizations :none
          (when (= :none optimizations)
            (if (= :nodejs target)
              ;; under node.js we load foreign libs globally
              (let [{:keys [js-dependency-index options]} @env/*compiler*
                    ijs-url (get-in js-dependency-index [(name lib) :url])]
                (emitln "cljs.core.load_file(\""
                  (str (io/file (util/output-directory options) (util/get-name ijs-url)))
                  "\");"))
              (emitln "goog.require('" (munge lib) "');"))))

        (or (-> libs meta :reload)
            (= (get reloads lib) :reload))


(defn get-define [mname jsdoc]
  (let [opts (get @env/*compiler* :options)]
    (and (some #?(:clj #(.startsWith ^String % "@define")
                  :cljs #(gstring/startsWith % "@define"))
           jsdoc)
         opts
         (= (:optimizations opts) :none)
         (let [define (get-in opts [:closure-defines (str mname)])]
