fix not-native tag for optimized cljs prot invocation
This commit is contained in:
parent
66f992efa7
commit
1d93961cd3
1 changed files with 4 additions and 3 deletions
|
|
@ -1,10 +1,11 @@
|
|||
(ns com.rpl.specter.prot-opt-invoke)
|
||||
|
||||
(defmacro mk-optimized-invocation [protocol obj method num-args]
|
||||
(let [args (take num-args (repeatedly gensym))]
|
||||
(let [args (take num-args (repeatedly gensym))
|
||||
o (-> (gensym) (with-meta {:tag 'not-native}))]
|
||||
`(if (~'implements? ~protocol ~obj)
|
||||
(fn [^not-native o# ~@args]
|
||||
(~method o# ~@args)
|
||||
(fn [~o ~@args]
|
||||
(~method ~o ~@args)
|
||||
)
|
||||
~method
|
||||
)))
|
||||
Loading…
Reference in a new issue