Permalink
Browse files

eval Class names correctly

  • Loading branch information...
1 parent e29a38f commit 3f082f6b04f2162b4afe642bea99284aa33f6d5d @remleduff committed Mar 12, 2012
Showing with 5 additions and 1 deletion.
  1. +3 −0 src/clojure/java/compiler.clj
  2. +2 −1 src/clojure/java/compiler/analysis.clj
@@ -218,6 +218,9 @@
(defmethod emit-value java.lang.String [t ^String v]
(.push *gen* v))
+(defmethod emit-value java.lang.Class [t v]
+ (.push *gen* (asm-type v)))
+
(defmethod emit-value clojure.lang.Symbol [t v]
(.push *gen* (namespace v))
(.push *gen* (name v))
@@ -74,6 +74,7 @@
java.lang.Float (if unboxed Double/TYPE Double)
java.lang.Double (if unboxed Double/TYPE Double)
java.lang.String java.lang.String
+ java.lang.Class java.lang.Class
clojure.lang.Keyword clojure.lang.Keyword
clojure.lang.Symbol clojure.lang.Symbol
clojure.lang.IPersistentMap clojure.lang.IPersistentMap
@@ -218,7 +219,7 @@
(cond
;; Transform vars that represent classes into constants
(instance? java.lang.Class o)
- (assoc form :op :constant)
+ (assoc form :op :constant :form o)
lb
(assoc form :referenced-locals #{{:name sym :type (expression-type form)}})
:else

0 comments on commit 3f082f6

Please sign in to comment.