 ;; TODO: move this logic out - David
 (defn analyze-keyword
   [env sym]
-  (register-constant! sym)
+  (register-constant! env sym)
   {:op :constant :env env :form sym :tag 'cljs.core/Keyword})
 
 (defn get-tag [e]

                   (Exception. (str "constant type " (type value) " not supported"))))]
    (symbol (str prefix (swap! constant-counter inc)))))

(defn- register-constant! [val]
  (swap! env/*compiler* update-in [::constant-table]
    (fn [table]
      (if (get table val)
        table
        (assoc table val (gen-constant-id val))))))

(def default-namespaces '{cljs.core {:name cljs.core}
                          cljs.user {:name cljs.user}})

                          :load-macros true}))]
                 (when (or *verbose* (:verbose opts))
                   (util/debug-prn "Reading analysis cache for " res))
                 (swap! env/*compiler*
                   (fn [cenv]
                     (let [cached-ns (edn/read-string (slurp cache))]
                       (doseq [x (::constants cached-ns)]
                         (register-constant! x))
                       (-> cenv
                         (assoc-in [::analyzed-cljs path] true)
                         (assoc-in [::namespaces ns] cached-ns))))))))))))))
