Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

CLJS-641: js* overflow for large inputs

sequence construction not wrapped in a lazy-seq, would result in a stack
overflow for large inputs
  • Loading branch information...
commit 819fb475dd7efa11fe9f3d6136373c8b95309dbd 1 parent ae1b851
David Nolen swannodette authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 1 src/clj/cljs/analyzer.clj
5 src/clj/cljs/analyzer.clj
@@ -937,7 +937,10 @@
937 937 (list s)
938 938 (let [end (.indexOf s "}" idx)
939 939 inner (:name (resolve-existing-var env (symbol (subs s (+ 2 idx) end))))]
940   - (cons (subs s 0 idx) (cons inner (interp (subs s (inc end)))))))))]
  940 + (lazy-seq
  941 + (cons (subs s 0 idx)
  942 + (cons inner
  943 + (interp (subs s (inc end))))))))))]
941 944 {:env env :op :js :form form :code (apply str (interp jsform))
942 945 :tag (-> form meta :tag) :js-op (-> form meta :js-op)})))
943 946

0 comments on commit 819fb47

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