   (fn [js-source]
     (throw (js/Error. "No *eval-fn* set"))))
 
-(defn empty-env []
+(defn empty-state []
   (env/default-compiler-env))
 
 ;; -----------------------------------------------------------------------------

     (cb ast))))

(defn analyze
  ([env source cb]
   (analyze env source nil cb))
  ([env source opts cb]
   (analyze*
     {:*compiler*     env
      :*cljs-ns*      (or (:ns env) 'cljs.user)
      :*ns*           (create-ns ana/*cljs-ns*)
      :*data-readers* tags/*cljs-data-readers*}
     source opts cb)))

;; -----------------------------------------------------------------------------
;; Emit

(defn emit* [bound-vars ast cb]
  (binding [env/*compiler* (:*compiler* bound-vars)]
    (cb (with-out-str (comp/emit ast)))))

(defn emit [state ast cb]
  (emit* {:*compiler* state} ast cb))

;; -----------------------------------------------------------------------------
;; Eval
