fix #152
This commit is contained in:
parent
ea1f851d94
commit
d9d6c8772e
1 changed files with 13 additions and 13 deletions
|
|
@ -96,11 +96,8 @@
|
||||||
#?(
|
#?(
|
||||||
:clj
|
:clj
|
||||||
(defmacro fast-object-array [i]
|
(defmacro fast-object-array [i]
|
||||||
`(com.rpl.specter.Util/makeObjectArray ~i))
|
`(com.rpl.specter.Util/makeObjectArray ~i)))
|
||||||
|
|
||||||
:cljs
|
|
||||||
(defn fast-object-array [i]
|
|
||||||
(object-array i)))
|
|
||||||
|
|
||||||
(defn benchmark [iters afn]
|
(defn benchmark [iters afn]
|
||||||
(time
|
(time
|
||||||
|
|
@ -110,11 +107,12 @@
|
||||||
#?(
|
#?(
|
||||||
:clj
|
:clj
|
||||||
(defmacro exec-select* [this & args]
|
(defmacro exec-select* [this & args]
|
||||||
(let [hinted (with-meta (gensym) {:tag 'com.rpl.specter.protocols.RichNavigator})]
|
(let [platform (if (contains? &env :locals) :cljs :clj)
|
||||||
|
hinted (with-meta (gensym) {:tag 'com.rpl.specter.protocols.RichNavigator})]
|
||||||
|
(if (= platform :cljs)
|
||||||
|
`(p/select* ~this ~@args)
|
||||||
`(let [~hinted ~this]
|
`(let [~hinted ~this]
|
||||||
(.select* ~hinted ~@args))))
|
(.select* ~hinted ~@args)))))
|
||||||
|
|
||||||
|
|
||||||
:cljs
|
:cljs
|
||||||
(defn exec-select* [this vals structure next-fn]
|
(defn exec-select* [this vals structure next-fn]
|
||||||
(p/select* ^not-native this vals structure next-fn)))
|
(p/select* ^not-native this vals structure next-fn)))
|
||||||
|
|
@ -123,10 +121,12 @@
|
||||||
#?(
|
#?(
|
||||||
:clj
|
:clj
|
||||||
(defmacro exec-transform* [this & args]
|
(defmacro exec-transform* [this & args]
|
||||||
(let [hinted (with-meta (gensym) {:tag 'com.rpl.specter.protocols.RichNavigator})]
|
(let [platform (if (contains? &env :locals) :cljs :clj)
|
||||||
|
hinted (with-meta (gensym) {:tag 'com.rpl.specter.protocols.RichNavigator})]
|
||||||
|
(if (= platform :cljs)
|
||||||
|
`(p/transform* ~this ~@args)
|
||||||
`(let [~hinted ~this]
|
`(let [~hinted ~this]
|
||||||
(.transform* ~hinted ~@args))))
|
(.transform* ~hinted ~@args)))))
|
||||||
|
|
||||||
|
|
||||||
:cljs
|
:cljs
|
||||||
(defn exec-transform* [this vals structure next-fn]
|
(defn exec-transform* [this vals structure next-fn]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue