From 1d93961cd3d052a6b632f6adb58b31f56bbd9b4d Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Fri, 3 Jul 2015 17:40:13 -0400 Subject: [PATCH] fix not-native tag for optimized cljs prot invocation --- src/com/rpl/specter/prot_opt_invoke.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/rpl/specter/prot_opt_invoke.clj b/src/com/rpl/specter/prot_opt_invoke.clj index cb6a6e7..7172be6 100644 --- a/src/com/rpl/specter/prot_opt_invoke.clj +++ b/src/com/rpl/specter/prot_opt_invoke.clj @@ -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 ))) \ No newline at end of file