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
|
||||
(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]
|
||||
(time
|
||||
|
|
@ -110,11 +107,12 @@
|
|||
#?(
|
||||
:clj
|
||||
(defmacro exec-select* [this & args]
|
||||
(let [hinted (with-meta (gensym) {:tag 'com.rpl.specter.protocols.RichNavigator})]
|
||||
`(let [~hinted ~this]
|
||||
(.select* ~hinted ~@args))))
|
||||
|
||||
|
||||
(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]
|
||||
(.select* ~hinted ~@args)))))
|
||||
:cljs
|
||||
(defn exec-select* [this vals structure next-fn]
|
||||
(p/select* ^not-native this vals structure next-fn)))
|
||||
|
|
@ -123,10 +121,12 @@
|
|||
#?(
|
||||
:clj
|
||||
(defmacro exec-transform* [this & args]
|
||||
(let [hinted (with-meta (gensym) {:tag 'com.rpl.specter.protocols.RichNavigator})]
|
||||
`(let [~hinted ~this]
|
||||
(.transform* ~hinted ~@args))))
|
||||
|
||||
(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]
|
||||
(.transform* ~hinted ~@args)))))
|
||||
|
||||
:cljs
|
||||
(defn exec-transform* [this vals structure next-fn]
|
||||
|
|
|
|||
Loading…
Reference in a new issue