Skip to content

Commit

Permalink
tweak, only load analysis caches in compile-file if we're optimizing …
Browse files Browse the repository at this point in the history
…constants,

this is what we need it for
  • Loading branch information
dnolen committed Mar 16, 2015
1 parent 9a276fb commit e8b0385
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clj/cljs/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1113,9 +1113,9 @@
ret))
(do
;; populate compilation environment with analysis information
;; while it would seem this isn't necessary avoiding to do so damages
;; composition of smaller compilation units like expressions (i.e. REPLs)
(when (not (contains? (::ana/namespaces @env/*compiler*) ns))
;; when constants are optimized
(when (and (true? (:optimize-constants opts))
(not (contains? (::ana/namespaces @env/*compiler*) ns)))
(with-core-cljs opts (fn [] (ana/analyze-file src-file opts))))
ns-info)))
(catch Exception e
Expand Down

0 comments on commit e8b0385

Please sign in to comment.