File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 334
334
(defmethod emit-constant Boolean [x] (if x " value_true" " value_false" ))
335
335
336
336
(defmethod emit-constant java.util.regex.Pattern [x]
337
- (emit-value-wrap :pattern-const nil (emits " pcre_pattern ( make_string (" (wrap-in-double-quotes (escape-string (str x))) " ))" ))
338
- #_ (FIXME-IMPLEMENT (str " Cannot emit java.util.regex.Pattern for constant " x " yet." )))
337
+
338
+ (emit-value-wrap :pattern-const
339
+ nil
340
+ (emits " FUNCALL1 ((closure_t*)VAR_NAME (cljc_DOT_core_SLASH_re_pattern), make_string ("
341
+ (wrap-in-double-quotes (escape-string (str x))) " ))" )))
339
342
340
343
(defmethod emit-constant clojure.lang.Keyword [x]
341
344
(emit-value-wrap :keyword nil
1987
1990
(comment
1988
1991
1989
1992
; ;the new way - use the REPL!!
1990
- (require '[cljs .compiler :as comp])
1993
+ (require '[cljc .compiler :as comp])
1991
1994
(def repl-env (comp/repl-env ))
1992
1995
(comp/repl repl-env)
1993
1996
; having problems?, try verbose mode
Original file line number Diff line number Diff line change 94
94
(recur (inc i) args))))
95
95
a))
96
96
97
+ (defn ^boolean array? [cand]
98
+ (has-type? cand Array))
99
+
97
100
(defn make-array [size]
98
101
(c* " make_array (integer_get (~{}))" size))
99
102
@@ -891,7 +894,7 @@ reduces them without incurring seq initialization"
891
894
(str ns " /" name)
892
895
name)]
893
896
#_(Symbol. ns name sym-str nil nil )
894
- (c* " make_symbol( string_get_utf8( make_string_copy( string_get_utf8 ( ~{}) ) ) )" sym-str))))
897
+ (c* " make_symbol( string_get_utf8( ~{}) )" sym-str))))
895
898
896
899
897
900
(defn ^boolean number? [n]
@@ -6315,7 +6318,7 @@ reduces them without incurring seq initialization"
6315
6318
6316
6319
(defn- parse-float [s]
6317
6320
(if-objc
6318
- (§ s :floatValue )
6321
+ (§ s :floatValue )
6319
6322
(c* " make_float (g_ascii_strtod (string_get_utf8 (~{}), NULL ) )" s)))
6320
6323
6321
6324
You can’t perform that action at this time.
0 commit comments