           (check-uses-and-load-macros))))
     (cb ast)))
 
-(defn analyze [env source cb]
-  (analyze* env
-    {:*cljs-ns*      (or (:ns env) 'cljs.user)
-     :*ns*           (create-ns ana/*cljs-ns*)
-     :*data-readers* tags/*cljs-data-readers*}
-    source cb))
+(defn analyze
+  ([env source cb]
+   (analyze env source nil cb))
+  ([env source opts cb]
+   (analyze* env
+     {:*cljs-ns*      (or (:ns env) 'cljs.user)
+      :*ns*           (create-ns ana/*cljs-ns*)
+      :*data-readers* tags/*cljs-data-readers*}
+     source opts cb)))
 
 ;; -----------------------------------------------------------------------------
 ;; Emit

  ([name reload cb]
   (*load-fn* name cb)))

(defn analyze* [env bound-vars source cb]
  (let [rdr  (rt/string-push-back-reader source)
        eof  (js-obj)
        aenv (ana/empty-env)]

      (loop []
        (let [form (r/read {:eof eof} rdr)]
          (if-not (identical? eof form)
            (let [aenv (assoc aenv :ns (ana/get-namespace ana/*cljs-ns*))
                  ast  (ana/analyze aenv form)]
              (if (= (:op ast) :ns)
                (ns-side-effects env ast opts bound-vars
                  (fn [_] (cb)))
                (recur)))
            (cb)))))))

(defn analyze-deps
