 
 (ns cljs.compiler
   (:refer-clojure :exclude [munge macroexpand-1])
-  (:require [cljs.util :as util]
-            [clojure.java.io :as io]
-            [clojure.string :as string]
-            [clojure.tools.reader :as reader]
-            [cljs.env :as env]
-            [cljs.tagged-literals :as tags]
-            [cljs.analyzer :as ana]
-            [cljs.source-map :as sm]
-            [clojure.data.json :as json]
-            [cljs.js-deps :as deps])
-  (:import java.lang.StringBuilder
-           java.io.File))
+  #?(:clj (:require [cljs.util :as util]
+                    [clojure.java.io :as io]
+                    [clojure.string :as string]
+                    [clojure.tools.reader :as reader]
+                    [cljs.env :as env]
+                    [cljs.tagged-literals :as tags]
+                    [cljs.analyzer :as ana]
+                    [cljs.source-map :as sm]
+                    [clojure.data.json :as json]
+                    [cljs.js-deps :as deps])
+     :cljs (:require [clojure.string :as string]
+                     [cljs.tools.reader :as reader]
+                     [cljs.env :as env]
+                     [cljs.analyzer :as ana]
+                     [cljs.source-map :as sm]))
+  #?(:clj (:import java.lang.StringBuilder
+                   java.io.File)))
 
 (set! *warn-on-reflection* true)
 


;; tagged literal support

(defmethod emit-constant java.util.Date [^java.util.Date date]
  (emits "new Date(" (.getTime date) ")"))

(defmethod emit-constant java.util.UUID [^java.util.UUID uuid]
  (emits "new cljs.core.UUID(\"" (.toString uuid) "\")"))

(defmacro emit-wrap [env & body]

    (emit-constant (hash kw))
    (emits ")")))

(defmethod emit-constant #?(:clj clojure.lang.Keyword :cljs Keyword) [x]
  (if (-> @env/*compiler* :options :emit-constants)
    (let [value (-> @env/*compiler* ::ana/constant-table x)]
      (emits "cljs.core." value))
    (emits-keyword x)
    ))

(defmethod emit-constant #?(:clj clojure.lang.Symbol :cljs Symbol) [x]
  (let [ns     (namespace x)
        name   (name x)
        symstr (if-not (nil? ns)
