Permalink
Browse files

Adds a type hint when emitting strings. Significant performance impro…

…vement in some workloads.
  • Loading branch information...
1 parent 08eb7d9 commit 185f4ff2460a9ecaa467bf1919e647991714a240 @arohner committed Oct 20, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 project.clj
  2. +1 −1 src/com/reasonr/scriptjure.clj
View
@@ -1,4 +1,4 @@
-(defproject scriptjure "0.1.17"
+(defproject scriptjure "0.1.18"
:description "a clojure DSL for generating javascript"
:url "http://github.com/arohner/scriptjure"
:dependencies [[org.clojure/clojure "1.2.0"]
@@ -55,7 +55,7 @@
(defmethod emit clojure.lang.Ratio [expr]
(str (float expr)))
-(defmethod emit java.lang.String [expr]
+(defmethod emit java.lang.String [^String expr]
(str \" (.replace expr "\"" "\\\"") \"))
(defn valid-symbol? [sym]

0 comments on commit 185f4ff

Please sign in to comment.