File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 492492(def ^:dynamic *cljs-warning-handlers*
493493 [default-warning-handler ])
494494
495+ (defn lite-mode? []
496+ (get-in @env/*compiler* [:options :lite-mode ]))
497+
495498#?(:clj
496499 (defmacro with-warning-handlers [handlers & body]
497500 `(binding [*cljs-warning-handlers* ~handlers]
Original file line number Diff line number Diff line change 522522 (and (every? #(= (:op %) :const ) keys)
523523 (= (count (into #{} keys)) (count keys)))))
524524
525- (defn lite-mode? []
526- (get-in @env/*compiler* [:options :lite-mode ]))
527-
528525(defn obj-map-key [x]
529526 (if (keyword? x)
530527 (str \" " \\ uFDD0" \'
570567(defmethod emit* :map
571568 [{:keys [env form keys vals]}]
572569 (emit-wrap env
573- (if (lite-mode? )
570+ (if (ana/ lite-mode? )
574571 (let [form-keys (clojure.core/keys form)]
575572 (if (every? #(or (string? %) (keyword? %)) form-keys)
576573 (emit-obj-map (map obj-map-key form-keys) vals comma-sep distinct-keys?)
599596(defmethod emit* :vector
600597 [{:keys [items env]}]
601598 (emit-wrap env
602- (if (lite-mode? )
599+ (if (ana/ lite-mode? )
603600 (emit-lite-vector items comma-sep)
604601 (emit-vector items comma-sep))))
605602
Original file line number Diff line number Diff line change 15111511 ; ; Elide all toString methods in :lite-mode
15121512 (remove
15131513 (core/fn [[f]]
1514- (core/and (comp /lite-mode? ) (core/= 'toString f))))
1514+ (core/and (ana /lite-mode? ) (core/= 'toString f))))
15151515 (map
15161516 (core/fn [[f & meths :as form]]
15171517 (core/let [[f meths] (if (vector? (first meths))
You can’t perform that action at this time.
0 commit comments