eliminate last cljs compiler warning
This commit is contained in:
parent
c1d9dff75e
commit
8a0ba0b3b0
2 changed files with 10 additions and 7 deletions
|
|
@ -2,6 +2,7 @@
|
|||
* More efficient inline caching for Clojure version, now inline caching is always within 5% of manually precompiled code
|
||||
* Significant performance improvement for ALL transform on maps for Clojure version (25% on simple benchmarks)
|
||||
* Significant performance improvements for FIRST/LAST for vectors
|
||||
* Eliminated compiler warnings when used in ClojureScript
|
||||
|
||||
## 0.11.0
|
||||
* New `path` macro does intelligent inline caching of the provided path. The path is factored into a static portion and into params which may change on each usage of the path (e.g. local parameters). The static part is factored and compiled on the first run-through, and then re-used for all subsequent invocations. As an example, `[ALL (keypath k)]` is factored into `[ALL keypath]`, which is compiled and cached, and `[k]`, which is provided on each execution. If it is not possible to precompile the path (e.g. [ALL some-local-variable]), nothing is cached and the path will be compiled on each run-through.
|
||||
|
|
|
|||
|
|
@ -43,16 +43,18 @@
|
|||
(defn throw-illegal [& args]
|
||||
(throw (js/Error. (apply str args))))
|
||||
|
||||
;; these macroexpand functions are for path macro in bootstrap cljs
|
||||
;; environment
|
||||
;; these macroexpand functions are for path macro in bootstrap cljs environment
|
||||
#+cljs
|
||||
(defn macroexpand'
|
||||
[form]
|
||||
(binding [^:cljs.analyzer/no-resolve cljs.js/*eval-fn*
|
||||
^:cljs.analyzer/no-resolve cljs.js/js-eval]
|
||||
(let [orig-eval-fn ^:cljs.analyzer/no-resolve cljs.js/*eval-fn*]
|
||||
(try
|
||||
(set! ^:cljs.analyzer/no-resolve cljs.js/*eval-fn* ^:cljs.analyzer/no-resolve cljs.js/js-eval)
|
||||
(^:cljs.analyzer/no-resolve cljs.js/eval (^:cljs.analyzer/no-resolve cljs.js/empty-state)
|
||||
`(macroexpand (quote ~form))
|
||||
identity)))
|
||||
identity)
|
||||
(finally
|
||||
(set! ^:cljs.analyzer/no-resolve cljs.js/*eval-fn* orig-eval-fn)))))
|
||||
|
||||
#+cljs
|
||||
(defn do-macroexpand-all
|
||||
|
|
|
|||
Loading…
Reference in a new issue