From e8b0385718c916c5ea18087d93fd102bd88b22db Mon Sep 17 00:00:00 2001 From: dnolen Date: Mon, 16 Mar 2015 18:42:23 -0400 Subject: [PATCH] tweak, only load analysis caches in compile-file if we're optimizing constants, this is what we need it for --- src/clj/cljs/compiler.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clj/cljs/compiler.clj b/src/clj/cljs/compiler.clj index 937c14ba5b..16654282dc 100644 --- a/src/clj/cljs/compiler.clj +++ b/src/clj/cljs/compiler.clj @@ -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