Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* src/clj/cljs/core.clj: if we have a protocol mask no need to call t…

…ype_satisfies_
  • Loading branch information...
commit 9c023d3b4af772aee1935c7c03c59b039db0f519 1 parent e8c5412
authored May 05, 2012

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. 12  src/clj/cljs/core.clj
12  src/clj/cljs/core.clj
@@ -549,11 +549,13 @@
549 549
         [part bit] (fast-path-protocols p)
550 550
         msym (symbol (core/str "-cljs$lang$protocol_mask$partition" part "$"))]
551 551
     `(let [~xsym ~x]
552  
-       (if (and (coercive-not= ~xsym nil)
553  
-                (or
554  
-                 ~(if bit `(unsafe-bit-and (. ~xsym ~msym) ~bit))
555  
-                 ~(bool-expr `(. ~xsym ~(symbol (core/str "-" prefix))))))
556  
-         true
  552
+       (if (coercive-not= ~xsym nil)
  553
+         (if (or ~(if bit `(unsafe-bit-and (. ~xsym ~msym) ~bit))
  554
+                 ~(bool-expr `(. ~xsym ~(symbol (core/str "-" prefix)))))
  555
+           true
  556
+           (if (coercive-not (. ~xsym ~msym))
  557
+             (cljs.core/type_satisfies_ ~psym ~xsym)
  558
+             false))
557 559
          (cljs.core/type_satisfies_ ~psym ~xsym)))))
558 560
 
559 561
 (defmacro lazy-seq [& body]

0 notes on commit 9c023d3

Please sign in to comment.
Something went wrong with that request. Please try again.