Skip to content

Commit 6656190

Browse files
committed
- :elide-to-string compiler flag
1 parent 5e99038 commit 6656190

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/main/clojure/cljs/analyzer.cljc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,9 @@
497497
(defn lite-mode? []
498498
(get-in @env/*compiler* [:options :lite-mode]))
499499

500+
(defn elide-to-string? []
501+
(get-in @env/*compiler* [:options :elide-to-string]))
502+
500503
#?(:clj
501504
(defmacro with-warning-handlers [handlers & body]
502505
`(binding [*cljs-warning-handlers* ~handlers]

src/main/clojure/cljs/closure.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@
211211
:watch :watch-error-fn :watch-fn :install-deps :process-shim :rename-prefix :rename-prefix-namespace
212212
:closure-variable-map-in :closure-property-map-in :closure-variable-map-out :closure-property-map-out
213213
:stable-names :ignore-js-module-exts :opts-cache :aot-cache :elide-strict :fingerprint :spec-skip-macros
214-
:nodejs-rt :target-fn :deps-cmd :bundle-cmd :global-goog-object&array :node-modules-dirs :lite-mode})
214+
:nodejs-rt :target-fn :deps-cmd :bundle-cmd :global-goog-object&array :node-modules-dirs :lite-mode
215+
:elide-to-string})
215216

216217
(def string->charset
217218
{"iso-8859-1" StandardCharsets/ISO_8859_1

src/main/clojure/cljs/core.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@
15111511
;; Elide all toString methods in :lite-mode
15121512
(remove
15131513
(core/fn [[f]]
1514-
(core/and (ana/lite-mode?) (core/= 'toString f))))
1514+
(core/and (ana/elide-to-string?) (core/= 'toString f))))
15151515
(map
15161516
(core/fn [[f & meths :as form]]
15171517
(core/let [[f meths] (if (vector? (first meths))

0 commit comments

Comments
 (0)