aboutsummaryrefslogtreecommitdiff
path: root/clojurescript
diff options
context:
space:
mode:
authorChouser <chouser@n01se.net>2008-11-16 06:05:57 +0000
committerChouser <chouser@n01se.net>2008-11-16 06:05:57 +0000
commitb73be8505e49ba987e33ce98a1cba9549512265e (patch)
treec6085225c6627fa3aa0c9b20ed4418064d3df4b8 /clojurescript
parent535ca2cae260c726ccdb6cbf6b3d1ce6ace16483 (diff)
Update ClojureScript for post-AOT
Diffstat (limited to 'clojurescript')
-rw-r--r--clojurescript/README.txt5
-rw-r--r--clojurescript/avoid-java-in-clojure-core.patch (renamed from clojurescript/avoid-java-in-boot.patch)196
-rw-r--r--clojurescript/boot.js3155
-rw-r--r--clojurescript/core.js3386
-rw-r--r--clojurescript/repl/repl.cljs6
-rw-r--r--clojurescript/repl/repl.html4
-rw-r--r--clojurescript/repl/repl.js162
-rw-r--r--clojurescript/rt.js (renamed from clojurescript/clj.js)490
-rw-r--r--clojurescript/tojs.clj32
9 files changed, 3866 insertions, 3570 deletions
diff --git a/clojurescript/README.txt b/clojurescript/README.txt
index 089bc276..5fe80972 100644
--- a/clojurescript/README.txt
+++ b/clojurescript/README.txt
@@ -3,7 +3,8 @@ ClojureScript. It currently allows code written in a very small
subset of Clojure to be automatically translated to JavaScript.
tojs.clj is Clojure code to translate Clojure forms to Javascript. It
-was used to generate boot.js from clojure's own boot.clj.
+was used to generate core.js from clojure's own core.clj and
+core-print.clj.
To run any of the tests, do something like:
@@ -12,7 +13,7 @@ clojure.lang.Script tojs.clj -- t03.cljs > t03.js
Now that you've got the .js file, you can test using Rhino:
-/usr/bin/java -jar /usr/share/java/js.jar -f clj.js -f boot.js -f t03.js
+/usr/bin/java -jar /usr/share/java/js.jar -f rt.js -f core.js -f t03.js
Or point a browser at test.html and choose the test you want to run.
diff --git a/clojurescript/avoid-java-in-boot.patch b/clojurescript/avoid-java-in-clojure-core.patch
index 6964ad73..6dd714d3 100644
--- a/clojurescript/avoid-java-in-boot.patch
+++ b/clojurescript/avoid-java-in-clojure-core.patch
@@ -1,23 +1,92 @@
-commit 46c8f274922f705aa0f95e7177d7476968e95b91
+commit f04a9322495cc7d02d9f2aa3e4e066e5829df6b7
Author: Chouser <chouser@n01se.net>
-Date: Sun Oct 26 01:09:48 2008 -0400
+Date: Sun Nov 16 01:02:30 2008 -0500
- Less Java dependence in boot.clj (for ClojureScript)
+ Less Java dependence in clojure.core (for ClojureScript)
-diff --git a/src/clj/clojure/boot.clj b/src/clj/clojure/boot.clj
-index 4415d9b..22771db 100644
---- a/src/clj/clojure/boot.clj
-+++ b/src/clj/clojure/boot.clj
-@@ -315,7 +315,7 @@
- ([#^Object x]
- (if (nil? x) "" (. x (toString))))
- ([x & ys]
-- (loop [sb (new StringBuilder #^String (str x)) more ys]
-+ (loop [sb (clojure.lang.RT/makeStringBuilder (str x)) more ys]
- (if more
- (recur (. sb (append (str (first more)))) (rest more))
- (str sb)))))
-@@ -532,7 +532,7 @@
+diff --git a/src/clj/clojure/core-print.clj b/src/clj/clojure/core-print.clj
+index 05c8abc..0f04558 100644
+--- a/src/clj/clojure/core-print.clj
++++ b/src/clj/clojure/core-print.clj
+@@ -75,14 +75,14 @@
+
+ (defn print-ctor [o print-args #^Writer w]
+ (.write w "#=(")
+- (.write w (.getName #^Class (class o)))
++ (.write w (RT/className (class o)))
+ (.write w ". ")
+ (print-args o w)
+ (.write w ")"))
+
+ (defmethod print-method :default [o, #^Writer w]
+ (.write w "#<")
+- (.write w (.getSimpleName (class o)))
++ (.write w (RT/simpleClassName (class o)))
+ (.write w " ")
+ (.write w (str o))
+ (.write w ">"))
+@@ -153,7 +153,7 @@
+ (defmethod print-dup clojure.lang.IPersistentCollection [o, #^Writer w]
+ (print-meta o w)
+ (.write w "#=(")
+- (.write w (.getName #^Class (class o)))
++ (.write w (RT/className (class o)))
+ (.write w "/create ")
+ (print-sequential "[" print-dup " " "]" o w)
+ (.write w ")"))
+@@ -212,7 +212,7 @@
+ (defmethod print-dup clojure.lang.IPersistentMap [m, #^Writer w]
+ (print-meta m w)
+ (.write w "#=(")
+- (.write w (.getName (class m)))
++ (.write w (RT/className (class m)))
+ (.write w "/create ")
+ (print-map m print-dup w)
+ (.write w ")"))
+@@ -268,7 +268,7 @@
+ Short/TYPE "Short/TYPE"})
+
+ (defmethod print-method Class [#^Class c, #^Writer w]
+- (.write w (.getName c)))
++ (.write w (RT/className c)))
+
+ (defmethod print-dup Class [#^Class c, #^Writer w]
+ (cond
+@@ -278,11 +278,11 @@
+ (.write w ")"))
+ (.isArray c) (do
+ (.write w "#=(java.lang.Class/forName \"")
+- (.write w (.getName c))
++ (.write w (RT/className c))
+ (.write w "\")"))
+ :else (do
+ (.write w "#=")
+- (.write w (.getName c)))))
++ (.write w (RT/className c)))))
+
+ (defmethod print-method java.math.BigDecimal [b, #^Writer w]
+ (.write w (str b))
+@@ -317,4 +317,4 @@
+ (print-dup (.name n) w)
+ (.write w ")"))
+
+-(def #^{:private true} print-initialized true)
+\ No newline at end of file
++(def #^{:private true} print-initialized true)
+diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
+index c0174c0..8376f13 100644
+--- a/src/clj/clojure/core.clj
++++ b/src/clj/clojure/core.clj
+@@ -319,7 +319,7 @@
+ (if more
+ (recur (. sb (append (str (first more)))) (rest more))
+ (str sb)))
+- (new StringBuilder #^String (str x)) ys)))
++ (clojure.lang.RT/makeStringBuilder (str x)) ys)))
+
+
+ (defn symbol?
+@@ -542,7 +542,7 @@
{:inline (fn [x y] `(. clojure.lang.Numbers (add ~x ~y)))
:inline-arities #{2}}
([] 0)
@@ -26,7 +95,7 @@ index 4415d9b..22771db 100644
([x y] (. clojure.lang.Numbers (add x y)))
([x y & more]
(reduce + (+ x y) more)))
-@@ -542,7 +542,7 @@
+@@ -552,7 +552,7 @@
{:inline (fn [x y] `(. clojure.lang.Numbers (multiply ~x ~y)))
:inline-arities #{2}}
([] 1)
@@ -35,7 +104,7 @@ index 4415d9b..22771db 100644
([x y] (. clojure.lang.Numbers (multiply x y)))
([x y & more]
(reduce * (* x y) more)))
-@@ -1032,7 +1032,7 @@
+@@ -1042,7 +1042,7 @@
([state] (new clojure.lang.Agent state))
([state validate-fn] (new clojure.lang.Agent state validate-fn)))
@@ -44,7 +113,7 @@ index 4415d9b..22771db 100644
(defn send
"Dispatch an action to an agent. Returns the agent immediately.
-@@ -1353,10 +1353,10 @@
+@@ -1363,10 +1363,10 @@
(defn range
"Returns a lazy seq of nums from start (inclusive) to end
(exclusive), by step, where start defaults to 0 and step to 1."
@@ -57,7 +126,7 @@ index 4415d9b..22771db 100644
(new clojure.lang.Range start end)
(take (- end start) (iterate inc start))))
([start end step]
-@@ -1423,7 +1423,7 @@
+@@ -1433,7 +1433,7 @@
([#^java.util.Comparator comp coll]
(when (and coll (not (zero? (count coll))))
(let [a (to-array coll)]
@@ -66,9 +135,9 @@ index 4415d9b..22771db 100644
(seq a)))))
(defn sort-by
-@@ -1453,8 +1453,8 @@
- ~@body)
- (recur (rest list#)))))
+@@ -1484,8 +1484,8 @@
+ (recur (rest sq#)))))))]
+ (apply emit binds)))
-(defn scan [& args] (throw (new Exception "scan is now called dorun")))
-(defn touch [& args] (throw (new Exception "touch is now called doall")))
@@ -77,7 +146,7 @@ index 4415d9b..22771db 100644
(defn dorun
"When lazy sequences are produced via functions that have side
-@@ -1489,7 +1489,7 @@
+@@ -1520,7 +1520,7 @@
occurred."
[& agents]
(when *agent*
@@ -85,8 +154,8 @@ index 4415d9b..22771db 100644
+ (throw (clojure.lang.RT/makeException "Can't await in agent action")))
(let [latch (new java.util.concurrent.CountDownLatch (count agents))
count-down (fn [agent] (. latch (countDown)) agent)]
- (doseq agent agents
-@@ -1508,7 +1508,7 @@
+ (doseq [agent agents]
+@@ -1539,7 +1539,7 @@
to timeout, non-nil otherwise."
[timeout-ms & agents]
(when *agent*
@@ -94,8 +163,8 @@ index 4415d9b..22771db 100644
+ (throw (clojure.lang.RT/makeException "Can't await in agent action")))
(let [latch (new java.util.concurrent.CountDownLatch (count agents))
count-down (fn [agent] (. latch (countDown)) agent)]
- (doseq agent agents
-@@ -1745,6 +1745,7 @@
+ (doseq [agent agents]
+@@ -1798,6 +1798,7 @@
(import '(java.lang.reflect Array))
@@ -103,7 +172,7 @@ index 4415d9b..22771db 100644
(defn alength
"Returns the length of the Java array. Works on arrays of all
-@@ -1764,7 +1765,7 @@
+@@ -1817,7 +1818,7 @@
{:inline (fn [a i] `(. clojure.lang.RT (aget ~a ~i)))
:inline-arities #{2}}
([array idx]
@@ -112,7 +181,7 @@ index 4415d9b..22771db 100644
([array idx & idxs]
(apply aget (aget array idx) idxs)))
-@@ -1774,7 +1775,7 @@
+@@ -1827,7 +1828,7 @@
{:inline (fn [a i v] `(. clojure.lang.RT (aset ~a ~i ~v)))
:inline-arities #{3}}
([array idx val]
@@ -121,7 +190,7 @@ index 4415d9b..22771db 100644
val)
([array idx idx2 & idxv]
(apply aset (aget array idx) idx2 idxv)))
-@@ -1942,6 +1943,10 @@
+@@ -1995,6 +1996,10 @@
"Returns a set of the distinct elements of coll."
[coll] (apply hash-set coll))
@@ -132,7 +201,7 @@ index 4415d9b..22771db 100644
(defn #^{:private true}
filter-key [keyfn pred amap]
(loop [ret {} es (seq amap)]
-@@ -1974,7 +1979,7 @@
+@@ -2027,7 +2032,7 @@
the-ns [x]
(if (instance? clojure.lang.Namespace x)
x
@@ -141,7 +210,7 @@ index 4415d9b..22771db 100644
(defn ns-name
"Returns the name of the namespace, a symbol."
-@@ -2007,7 +2012,7 @@
+@@ -2060,7 +2065,7 @@
(defn ns-imports
"Returns a map of the import mappings for the namespace."
[ns]
@@ -150,7 +219,7 @@ index 4415d9b..22771db 100644
(defn refer
"refers to all public vars of ns, subject to filters.
-@@ -2025,7 +2030,8 @@
+@@ -2078,7 +2083,8 @@
to a symbol different from the var's name, in order to prevent
clashes. Use :use in the ns macro in preference to calling this directly."
[ns-sym & filters]
@@ -160,7 +229,7 @@ index 4415d9b..22771db 100644
fs (apply hash-map filters)
nspublics (ns-publics ns)
rename (or (:rename fs) {})
-@@ -2161,7 +2167,7 @@
+@@ -2207,7 +2213,7 @@
true)
(= firstb :as) (pb ret (second bs) gvec)
:else (if seen-rest?
@@ -169,7 +238,7 @@ index 4415d9b..22771db 100644
(recur (pb ret firstb (list `nth gvec n nil))
(inc n)
(rest bs)
-@@ -2192,7 +2198,7 @@
+@@ -2238,7 +2244,7 @@
(symbol? b) (-> bvec (conj b) (conj v))
(vector? b) (pvec bvec b v)
(map? b) (pmap bvec b v)
@@ -178,7 +247,7 @@ index 4415d9b..22771db 100644
process-entry (fn [bvec b] (pb bvec (key b) (val b)))]
(if (every? symbol? (keys bmap))
bindings
-@@ -2333,7 +2339,7 @@
+@@ -2385,7 +2391,7 @@
StringWriter. Returns the string created by any nested printing
calls."
[& body]
@@ -187,7 +256,7 @@ index 4415d9b..22771db 100644
(binding [*out* s#]
~@body
(str s#))))
-@@ -2379,7 +2385,7 @@
+@@ -2431,7 +2437,7 @@
logical true."
[x]
`(when-not ~x
@@ -196,7 +265,7 @@ index 4415d9b..22771db 100644
(defn test
"test [v] finds fn at key :test in var metadata and calls it,
-@@ -2451,7 +2457,7 @@
+@@ -2503,7 +2509,7 @@
(defn rand
"Returns a random floating point number between 0 (inclusive) and
1 (exclusive)."
@@ -205,16 +274,16 @@ index 4415d9b..22771db 100644
([n] (* n (rand))))
(defn rand-int
-@@ -2561,7 +2567,7 @@
+@@ -2613,7 +2619,7 @@
"Reads the file named by f into a string and returns it."
[#^String f]
- (with-open r (new java.io.BufferedReader (new java.io.FileReader f))
+ (with-open [r (new java.io.BufferedReader (new java.io.FileReader f))]
- (let [sb (new StringBuilder)]
+ (let [sb (RT/makeStringBuilder)]
(loop [c (. r (read))]
(if (neg? c)
(str sb)
-@@ -2845,10 +2851,6 @@
+@@ -2897,10 +2903,6 @@
(send-off agt fill)
(drain))))
@@ -225,7 +294,7 @@ index 4415d9b..22771db 100644
(defn alter-var-root
"Atomically alters the root binding of var v by applying f to its
current value plus any args"
-@@ -2934,7 +2936,7 @@
+@@ -2986,7 +2988,7 @@
relationships."
([tag] (descendants global-hierarchy tag))
([h tag] (if (class? tag)
@@ -234,7 +303,7 @@ index 4415d9b..22771db 100644
(not-empty (get (:descendants h) tag)))))
(defn derive
-@@ -2961,9 +2963,9 @@
+@@ -3013,9 +3015,9 @@
(or
(when-not (contains? (tp tag) parent)
(when (contains? (ta tag) parent)
@@ -246,7 +315,7 @@ index 4415d9b..22771db 100644
{:parents (assoc (:parents h) tag (conj (get tp tag #{}) parent))
:ancestors (tf (:ancestors h) tag td parent ta)
:descendants (tf (:descendants h) parent ta tag td)})
-@@ -3090,7 +3092,7 @@
+@@ -3142,7 +3144,7 @@
[pred fmt & args]
(when pred
(let [message (apply format fmt args)
@@ -255,34 +324,11 @@ index 4415d9b..22771db 100644
raw-trace (.getStackTrace exception)
boring? #(not= (.getMethodName %) "doInvoke")
trace (into-array (drop 2 (drop-while boring? raw-trace)))]
-@@ -3489,7 +3491,7 @@
-
- (defn print-ctor [o print-args #^Writer w]
- (.write w "#=(")
-- (.write w (.getName (class o)))
-+ (.write w (RT/className (class o)))
- (.write w ". ")
- (print-args o w)
- (.write w ")"))
-@@ -3630,11 +3632,11 @@
- (.write w ")"))
- (.isArray c) (do
- (.write w "#=(java.lang.Class/forName \"")
-- (.write w (.getName c))
-+ (.write w (RT/className c))
- (.write w "\")"))
- :else (do
- (.write w "#=")
-- (.write w (.getName c)))))
-+ (.write w (RT/className c)))))
-
- (defmethod print-method java.math.BigDecimal [b, #^Writer w]
- (.write w (str b))
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java
-index 2cb519c..8c45c73 100644
+index dc4451a..9d7e31f 100644
--- a/src/jvm/clojure/lang/RT.java
+++ b/src/jvm/clojure/lang/RT.java
-@@ -30,6 +30,8 @@ public class RT{
+@@ -35,6 +35,8 @@ public class RT{
static final public Boolean T = Boolean.TRUE;//Keyword.intern(Symbol.create(null, "t"));
static final public Boolean F = Boolean.FALSE;//Keyword.intern(Symbol.create(null, "t"));
@@ -291,7 +337,7 @@ index 2cb519c..8c45c73 100644
//simple-symbol->class
final static IPersistentMap DEFAULT_IMPORTS = map(
// Symbol.create("RT"), "clojure.lang.RT",
-@@ -963,6 +965,10 @@ static public double doubleCast(double x){
+@@ -1058,6 +1060,10 @@ static public double doubleCast(double x){
return x;
}
@@ -302,7 +348,7 @@ index 2cb519c..8c45c73 100644
static public IPersistentMap map(Object... init){
if(init != null && init.length == 2)
return new PersistentArrayMap(init);
-@@ -1680,4 +1686,39 @@ static public int alength(Object xs){
+@@ -1780,4 +1786,43 @@ static public int alength(Object xs){
return Array.getLength(xs);
}
@@ -341,4 +387,8 @@ index 2cb519c..8c45c73 100644
+ return c.getName();
+}
+
++static public String simpleClassName(Class c){
++ return c.getSimpleName();
++}
++
}
diff --git a/clojurescript/boot.js b/clojurescript/boot.js
deleted file mode 100644
index f7f3af9f..00000000
--- a/clojurescript/boot.js
+++ /dev/null
@@ -1,3155 +0,0 @@
-
-//======
-//(in-ns (quote clojure))
-//---
-(function __user_fn_2883(){
-return (clojure.in_ns.apply(null,[clojure.symbol("clojure")]))}).apply(null,[]);
-
-//======
-//(def list (. clojure.lang.PersistentList creator))
-//---
-(function __clojure_fn_2889(){
-return (clojure.JS.def(clojure,"list",clojure.JS.getOrRun(clojure.lang.PersistentList,"creator")))}).apply(null,[]);
-// Skipping: (def cons (fn* cons [x seq] (. clojure.lang.RT (cons x seq))))
-// Skipping: (def let (fn* let [& decl] (cons (quote let*) decl)))
-// Skipping: (def loop (fn* loop [& decl] (cons (quote loop*) decl)))
-// Skipping: (def fn (fn* fn [& decl] (cons (quote fn*) decl)))
-// Skipping: (def first (fn first [coll] (. clojure.lang.RT (first coll))))
-// Skipping: (def rest (fn rest [x] (. clojure.lang.RT (rest x))))
-
-//======
-//(def conj (fn conj ([coll x] (. clojure.lang.RT (conj coll x))) ([coll x & xs] (if xs (recur (conj coll x) (first xs) (rest xs)) (conj coll x)))))
-//---
-(function __clojure_fn_2922(){
-return (clojure.JS.def(clojure,"conj",clojure.JS.variadic(2,(function __clojure_fn_2922_conj_2924(coll_1,x_2){switch(arguments.length){
-case 2:var conj_0=arguments.callee;
-return (clojure.lang.RT.conj(coll_1,x_2))}
-var _cnt,_rtn,conj_0=arguments.callee,xs_3=clojure.JS.rest_args(this,arguments,2);
-do{_cnt=0;_rtn=((xs_3)?((_cnt=1,_rtn=[conj_0.apply(null,[coll_1,x_2]),clojure.first.apply(null,[xs_3]),clojure.rest.apply(null,[xs_3])],coll_1=_rtn[0],x_2=_rtn[1],xs_3=_rtn[2])):(conj_0.apply(null,[coll_1,x_2])))
-}while(_cnt);return _rtn;}))))}).apply(null,[]);
-
-//======
-//(def second (fn second [x] (first (rest x))))
-//---
-(function __clojure_fn_2927(){
-return (clojure.JS.def(clojure,"second",(function __clojure_fn_2927_second_2929(x_1){
-var second_0=arguments.callee;
-return (clojure.first.apply(null,[clojure.rest.apply(null,[x_1])]))})))}).apply(null,[]);
-
-//======
-//(def ffirst (fn ffirst [x] (first (first x))))
-//---
-(function __clojure_fn_2932(){
-return (clojure.JS.def(clojure,"ffirst",(function __clojure_fn_2932_ffirst_2934(x_1){
-var ffirst_0=arguments.callee;
-return (clojure.first.apply(null,[clojure.first.apply(null,[x_1])]))})))}).apply(null,[]);
-
-//======
-//(def rfirst (fn rfirst [x] (rest (first x))))
-//---
-(function __clojure_fn_2937(){
-return (clojure.JS.def(clojure,"rfirst",(function __clojure_fn_2937_rfirst_2939(x_1){
-var rfirst_0=arguments.callee;
-return (clojure.rest.apply(null,[clojure.first.apply(null,[x_1])]))})))}).apply(null,[]);
-
-//======
-//(def frest (fn frest [x] (first (rest x))))
-//---
-(function __clojure_fn_2942(){
-return (clojure.JS.def(clojure,"frest",(function __clojure_fn_2942_frest_2944(x_1){
-var frest_0=arguments.callee;
-return (clojure.first.apply(null,[clojure.rest.apply(null,[x_1])]))})))}).apply(null,[]);
-
-//======
-//(def rrest (fn rrest [x] (rest (rest x))))
-//---
-(function __clojure_fn_2947(){
-return (clojure.JS.def(clojure,"rrest",(function __clojure_fn_2947_rrest_2949(x_1){
-var rrest_0=arguments.callee;
-return (clojure.rest.apply(null,[clojure.rest.apply(null,[x_1])]))})))}).apply(null,[]);
-// Skipping: (def seq (fn seq [coll] (. clojure.lang.RT (seq coll))))
-// Skipping: (def instance? (fn instance? [c x] (. c (isInstance x))))
-
-//======
-//(def seq? (fn seq? [x] (instance? clojure.lang.ISeq x)))
-//---
-(function __clojure_fn_2962(){
-return (clojure.JS.def(clojure,"seq_QMARK_",(function __clojure_fn_2962_seq_QMARK_2964(x_1){
-var seq_QMARK__0=arguments.callee;
-return (clojure.instance_QMARK_.apply(null,[clojure.lang.ISeq,x_1]))})))}).apply(null,[]);
-// Skipping: (def string? (fn string? [x] (instance? String x)))
-
-//======
-//(def map? (fn map? [x] (instance? clojure.lang.IPersistentMap x)))
-//---
-(function __clojure_fn_2972(){
-return (clojure.JS.def(clojure,"map_QMARK_",(function __clojure_fn_2972_map_QMARK_2974(x_1){
-var map_QMARK__0=arguments.callee;
-return (clojure.instance_QMARK_.apply(null,[clojure.lang.IPersistentMap,x_1]))})))}).apply(null,[]);
-
-//======
-//(def vector? (fn vector? [x] (instance? clojure.lang.IPersistentVector x)))
-//---
-(function __clojure_fn_2977(){
-return (clojure.JS.def(clojure,"vector_QMARK_",(function __clojure_fn_2977_vector_QMARK_2979(x_1){
-var vector_QMARK__0=arguments.callee;
-return (clojure.instance_QMARK_.apply(null,[clojure.lang.IPersistentVector,x_1]))})))}).apply(null,[]);
-
-//======
-//(def sigs (fn [fdecl] (if (seq? (first fdecl)) (loop [ret [] fdecl fdecl] (if fdecl (recur (conj ret (first (first fdecl))) (rest fdecl)) (seq ret))) (list (first fdecl)))))
-//---
-(function __clojure_fn_2982(){
-return (clojure.JS.def(clojure,"sigs",(function __clojure_fn_2982_sigs_2984(fdecl_1){
-var ret_2,fdecl_3;
-return (((clojure.seq_QMARK_.apply(null,[clojure.first.apply(null,[fdecl_1])]))?(((function __loop(){var _rtn,_cnt;(ret_2=clojure.lang.PersistentVector.EMPTY),
-(fdecl_3=fdecl_1);do{_cnt=0;
-_rtn=((fdecl_3)?((_cnt=1,_rtn=[clojure.conj.apply(null,[ret_2,clojure.first.apply(null,[clojure.first.apply(null,[fdecl_3])])]),clojure.rest.apply(null,[fdecl_3])],ret_2=_rtn[0],fdecl_3=_rtn[1])):(clojure.seq.apply(null,[ret_2])))}while(_cnt);return _rtn;})())):(clojure.list.apply(null,[clojure.first.apply(null,[fdecl_1])]))))})))}).apply(null,[]);
-// Skipping: (def assoc (fn assoc ([map key val] (. clojure.lang.RT (assoc map key val))) ([map key val & kvs] (let [ret (assoc map key val)] (if kvs (recur ret (first kvs) (second kvs) (rrest kvs)) ret)))))
-
-//======
-//(def meta (fn meta [x] (if (instance? clojure.lang.IObj x) (. x (meta)))))
-//---
-(function __clojure_fn_2993(){
-return (clojure.JS.def(clojure,"meta",(function __clojure_fn_2993_meta_2995(x_1){
-var meta_0=arguments.callee;
-return (((clojure.instance_QMARK_.apply(null,[clojure.lang.IObj,x_1]))?((x_1).meta()):(null)))})))}).apply(null,[]);
-
-//======
-//(def with-meta (fn with-meta [x m] (. x (withMeta m))))
-//---
-(function __clojure_fn_2998(){
-return (clojure.JS.def(clojure,"with_meta",(function __clojure_fn_2998_with_meta_3000(x_1,m_2){
-var with_meta_0=arguments.callee;
-return ((x_1).withMeta(m_2))})))}).apply(null,[]);
-
-//======
-//(def last (fn last [s] (if (rest s) (recur (rest s)) (first s))))
-//---
-(function __clojure_fn_3003(){
-return (clojure.JS.def(clojure,"last",(function __clojure_fn_3003_last_3005(s_1){
-var _cnt,_rtn,last_0=arguments.callee;
-do{_cnt=0;_rtn=((clojure.rest.apply(null,[s_1]))?((_cnt=1,_rtn=[clojure.rest.apply(null,[s_1])],s_1=_rtn[0])):(clojure.first.apply(null,[s_1])))
-}while(_cnt);return _rtn;})))}).apply(null,[]);
-
-//======
-//(def butlast (fn butlast [s] (loop [ret [] s s] (if (rest s) (recur (conj ret (first s)) (rest s)) (seq ret)))))
-//---
-(function __clojure_fn_3008(){
-return (clojure.JS.def(clojure,"butlast",(function __clojure_fn_3008_butlast_3010(s_1){
-var s_3,ret_2,butlast_0=arguments.callee;
-return (((function __loop(){var _rtn,_cnt;(ret_2=clojure.lang.PersistentVector.EMPTY),
-(s_3=s_1);do{_cnt=0;
-_rtn=((clojure.rest.apply(null,[s_3]))?((_cnt=1,_rtn=[clojure.conj.apply(null,[ret_2,clojure.first.apply(null,[s_3])]),clojure.rest.apply(null,[s_3])],ret_2=_rtn[0],s_3=_rtn[1])):(clojure.seq.apply(null,[ret_2])))}while(_cnt);return _rtn;})()))})))}).apply(null,[]);
-
-//======
-//(def defn (fn defn [name & fdecl] (let [m (if (string? (first fdecl)) {:doc (first fdecl)} {}) fdecl (if (string? (first fdecl)) (rest fdecl) fdecl) m (if (map? (first fdecl)) (conj m (first fdecl)) m) fdecl (if (map? (first fdecl)) (rest fdecl) fdecl) fdecl (if (vector? (first fdecl)) (list fdecl) fdecl) m (if (map? (last fdecl)) (conj m (last fdecl)) m) fdecl (if (map? (last fdecl)) (butlast fdecl) fdecl) m (conj {:arglists (list (quote quote) (sigs fdecl))} m)] (list (quote def) (with-meta name (conj (if (meta name) (meta name) {}) m)) (cons (quote clojure/fn) fdecl)))))
-//---
-(function __clojure_fn_3013(){
-return (clojure.JS.def(clojure,"defn",clojure.JS.variadic(1,(function __clojure_fn_3013_defn_3015(name_1){
-var fdecl_4,fdecl_6,m_5,fdecl_7,m_8,fdecl_9,m_10,m_3,defn_0=arguments.callee,fdecl_2=clojure.JS.rest_args(this,arguments,1);
-return (((m_3=((clojure.string_QMARK_.apply(null,[clojure.first.apply(null,[fdecl_2])]))?(clojure.hash_map(clojure.keyword("","doc"),clojure.first.apply(null,[fdecl_2]))):(clojure.lang.PersistentHashMap.EMPTY))),
-(fdecl_4=((clojure.string_QMARK_.apply(null,[clojure.first.apply(null,[fdecl_2])]))?(clojure.rest.apply(null,[fdecl_2])):(fdecl_2))),
-(m_5=((clojure.map_QMARK_.apply(null,[clojure.first.apply(null,[fdecl_4])]))?(clojure.conj.apply(null,[m_3,clojure.first.apply(null,[fdecl_4])])):(m_3))),
-(fdecl_6=((clojure.map_QMARK_.apply(null,[clojure.first.apply(null,[fdecl_4])]))?(clojure.rest.apply(null,[fdecl_4])):(fdecl_4))),
-(fdecl_7=((clojure.vector_QMARK_.apply(null,[clojure.first.apply(null,[fdecl_6])]))?(clojure.list.apply(null,[fdecl_6])):(fdecl_6))),
-(m_8=((clojure.map_QMARK_.apply(null,[clojure.last.apply(null,[fdecl_7])]))?(clojure.conj.apply(null,[m_5,clojure.last.apply(null,[fdecl_7])])):(m_5))),
-(fdecl_9=((clojure.map_QMARK_.apply(null,[clojure.last.apply(null,[fdecl_7])]))?(clojure.butlast.apply(null,[fdecl_7])):(fdecl_7))),
-(m_10=clojure.conj.apply(null,[clojure.hash_map(clojure.keyword("","arglists"),clojure.list.apply(null,[clojure.symbol("quote"),clojure.sigs.apply(null,[fdecl_9])])),m_8])),
-clojure.list.apply(null,[clojure.symbol("def"),clojure.with_meta.apply(null,[name_1,clojure.conj.apply(null,[((clojure.meta.apply(null,[name_1]))?(clojure.meta.apply(null,[name_1])):(clojure.lang.PersistentHashMap.EMPTY)),m_10])]),clojure.cons.apply(null,[clojure.symbol("clojure/fn"),fdecl_9])])))}))))}).apply(null,[]);
-// Skipping: (. (var defn) (setMacro))
-
-//======
-//(defn cast "Throws a ClassCastException if x is not a c, else returns x." [c x] (. c (cast x)))
-//---
-(function __clojure_fn_3021(){
-return (clojure.JS.def(clojure,"cast",(function __clojure_fn_3021_cast_3023(c_1,x_2){
-return ((c_1).cast(x_2))})))}).apply(null,[]);
-// Skipping: (defn to-array "Returns an array of Objects containing the contents of coll, which\n can be any Collection. Maps to java.util.Collection.toArray()." [coll] (. clojure.lang.RT (toArray coll)))
-
-//======
-//(defn vector "Creates a new vector containing the args." ([] []) ([& args] (. clojure.lang.LazilyPersistentVector (create args))))
-//---
-(function __clojure_fn_3033(){
-return (clojure.JS.def(clojure,"vector",clojure.JS.variadic(0,(function __clojure_fn_3033_vector_3035(){switch(arguments.length){
-case 0:return (clojure.lang.PersistentVector.EMPTY)}
-var args_1=clojure.JS.rest_args(this,arguments,0);
-return (clojure.lang.LazilyPersistentVector.create(args_1))}))))}).apply(null,[]);
-
-//======
-//(defn vec "Creates a new vector containing the contents of coll." ([coll] (. clojure.lang.LazilyPersistentVector (createOwning (to-array coll)))))
-//---
-(function __clojure_fn_3040(){
-return (clojure.JS.def(clojure,"vec",(function __clojure_fn_3040_vec_3042(coll_1){
-return (clojure.lang.LazilyPersistentVector.createOwning(clojure.to_array.apply(null,[coll_1])))})))}).apply(null,[]);
-// Skipping: (defn hash-map "keyval => key val\n Returns a new hash map with supplied mappings." ([] {}) ([& keyvals] (. clojure.lang.PersistentHashMap (create keyvals))))
-
-//======
-//(defn hash-set "Returns a new hash set with supplied keys." ([] #{}) ([& keys] (. clojure.lang.PersistentHashSet (create keys))))
-//---
-(function __clojure_fn_3053(){
-return (clojure.JS.def(clojure,"hash_set",clojure.JS.variadic(0,(function __clojure_fn_3053_hash_set_3055(){switch(arguments.length){
-case 0:return (clojure.lang.PersistentHashSet.EMPTY)}
-var keys_1=clojure.JS.rest_args(this,arguments,0);
-return (clojure.lang.PersistentHashSet.create(keys_1))}))))}).apply(null,[]);
-
-//======
-//(defn sorted-map "keyval => key val\n Returns a new sorted map with supplied mappings." ([& keyvals] (. clojure.lang.PersistentTreeMap (create keyvals))))
-//---
-(function __clojure_fn_3060(){
-return (clojure.JS.def(clojure,"sorted_map",clojure.JS.variadic(0,(function __clojure_fn_3060_sorted_map_3062(){
-var keyvals_1=clojure.JS.rest_args(this,arguments,0);
-return (clojure.lang.PersistentTreeMap.create(keyvals_1))}))))}).apply(null,[]);
-
-//======
-//(defn sorted-set "Returns a new sorted set with supplied keys." ([& keys] (. clojure.lang.PersistentTreeSet (create keys))))
-//---
-(function __clojure_fn_3066(){
-return (clojure.JS.def(clojure,"sorted_set",clojure.JS.variadic(0,(function __clojure_fn_3066_sorted_set_3068(){
-var keys_1=clojure.JS.rest_args(this,arguments,0);
-return (clojure.lang.PersistentTreeSet.create(keys_1))}))))}).apply(null,[]);
-
-//======
-//(defn sorted-map-by "keyval => key val\n Returns a new sorted map with supplied mappings, using the supplied comparator." ([comparator & keyvals] (. clojure.lang.PersistentTreeMap (create comparator keyvals))))
-//---
-(function __clojure_fn_3072(){
-return (clojure.JS.def(clojure,"sorted_map_by",clojure.JS.variadic(1,(function __clojure_fn_3072_sorted_map_by_3074(comparator_1){
-var keyvals_2=clojure.JS.rest_args(this,arguments,1);
-return (clojure.lang.PersistentTreeMap.create(comparator_1,keyvals_2))}))))}).apply(null,[]);
-
-//======
-//(def defmacro (fn [name & args] (list (quote do) (cons (quote clojure/defn) (cons name args)) (list (quote .) (list (quote var) name) (quote (setMacro))))))
-//---
-(function __clojure_fn_3078(){
-return (clojure.JS.def(clojure,"defmacro",clojure.JS.variadic(1,(function __clojure_fn_3078_defmacro_3080(name_1){
-var args_2=clojure.JS.rest_args(this,arguments,1);
-return (clojure.list.apply(null,[clojure.symbol("do"),clojure.cons.apply(null,[clojure.symbol("clojure/defn"),clojure.cons.apply(null,[name_1,args_2])]),clojure.list.apply(null,[clojure.symbol("."),clojure.list.apply(null,[clojure.symbol("var"),name_1]),clojure.JS.lit_list([clojure.symbol("setMacro")])])]))}))))}).apply(null,[]);
-// Skipping: (. (var defmacro) (setMacro))
-// Skipping: (defmacro when "Evaluates test. If logical true, evaluates body in an implicit do." [test & body] (list (quote if) test (cons (quote do) body)))
-// Skipping: (defmacro when-not "Evaluates test. If logical false, evaluates body in an implicit do." [test & body] (list (quote if) test nil (cons (quote do) body)))
-
-//======
-//(defn nil? "Returns true if x is nil, false otherwise." {:tag Boolean} [x] (identical? x nil))
-//---
-(function __clojure_fn_3099(){
-return (clojure.JS.def(clojure,"nil_QMARK_",(function __clojure_fn_3099_nil_QMARK_3101(x_1){
-return (clojure.identical_QMARK_.apply(null,[x_1,null]))})))}).apply(null,[]);
-
-//======
-//(defn false? "Returns true if x is the value false, false otherwise." {:tag Boolean} [x] (identical? x false))
-//---
-(function __clojure_fn_3105(){
-return (clojure.JS.def(clojure,"false_QMARK_",(function __clojure_fn_3105_false_QMARK_3107(x_1){
-return (clojure.identical_QMARK_.apply(null,[x_1,false]))})))}).apply(null,[]);
-
-//======
-//(defn true? "Returns true if x is the value true, false otherwise." {:tag Boolean} [x] (identical? x true))
-//---
-(function __clojure_fn_3111(){
-return (clojure.JS.def(clojure,"true_QMARK_",(function __clojure_fn_3111_true_QMARK_3113(x_1){
-return (clojure.identical_QMARK_.apply(null,[x_1,true]))})))}).apply(null,[]);
-
-//======
-//(defn not "Returns true if x is logical false, false otherwise." {:tag Boolean} [x] (if x false true))
-//---
-(function __clojure_fn_3117(){
-return (clojure.JS.def(clojure,"not",(function __clojure_fn_3117_not_3119(x_1){
-return (((x_1)?(false):(true)))})))}).apply(null,[]);
-
-//======
-//(defn str "With no args, returns the empty string. With one arg x, returns\n x.toString(). (str nil) returns the empty string. With more than\n one arg, returns the concatenation of the str values of the args." {:tag String} ([] "") ([x] (if (nil? x) "" (. x (toString)))) ([x & ys] (loop [sb (clojure.lang.RT/makeStringBuilder (str x)) more ys] (if more (recur (. sb (append (str (first more)))) (rest more)) (str sb)))))
-//---
-(function __clojure_fn_3123(){
-return (clojure.JS.def(clojure,"str",clojure.JS.variadic(1,(function __clojure_fn_3123_str_3125(x_1){switch(arguments.length){
-case 0:return ("")
-case 1:return (((clojure.nil_QMARK_.apply(null,[x_1]))?(""):((x_1).toString())))}
-var more_4,sb_3,ys_2=clojure.JS.rest_args(this,arguments,1);
-return (((function __loop(){var _rtn,_cnt;(sb_3=clojure.lang.RT.makeStringBuilder(clojure.str.apply(null,[x_1]))),
-(more_4=ys_2);do{_cnt=0;
-_rtn=((more_4)?((_cnt=1,_rtn=[(sb_3).append(clojure.str.apply(null,[clojure.first.apply(null,[more_4])])),clojure.rest.apply(null,[more_4])],sb_3=_rtn[0],more_4=_rtn[1])):(clojure.str.apply(null,[sb_3])))}while(_cnt);return _rtn;})()))}))))}).apply(null,[]);
-// Skipping: (defn symbol "Returns a Symbol with the given namespace and name." ([name] (. clojure.lang.Symbol (intern name))) ([ns name] (. clojure.lang.Symbol (intern ns name))))
-// Skipping: (defn keyword "Returns a Keyword with the given namespace and name. Do not use :\n in the keyword strings, it will be added automatically." ([name] (. clojure.lang.Keyword (intern nil name))) ([ns name] (. clojure.lang.Keyword (intern ns name))))
-
-//======
-//(defn gensym "Returns a new symbol with a unique name. If a prefix string is\n supplied, the name is prefix# where # is some unique number. If\n prefix is not supplied, the prefix is 'G'." ([] (gensym "G__")) ([prefix-string] (. clojure.lang.Symbol (intern (str prefix-string (str (. clojure.lang.RT (nextID))))))))
-//---
-(function __clojure_fn_3145(){
-return (clojure.JS.def(clojure,"gensym",(function __clojure_fn_3145_gensym_3147(prefix_string_1){switch(arguments.length){
-case 0:return (clojure.gensym.apply(null,["G__"]))}
-return (clojure.lang.Symbol.intern(clojure.str.apply(null,[prefix_string_1,clojure.str.apply(null,[clojure.lang.RT.nextID()])])))})))}).apply(null,[]);
-// Skipping: (defmacro cond "Takes a set of test/expr pairs. It evaluates each test one at a\n time. If a test returns logical true, cond evaluates and returns\n the value of the corresponding expr and doesn't evaluate any of the\n other tests or exprs. (cond) returns nil." [& clauses] (when clauses (list (quote if) (first clauses) (second clauses) (cons (quote cond) (rest (rest clauses))))))
-
-//======
-//(defn spread {:private true} [arglist] (cond (nil? arglist) nil (nil? (rest arglist)) (seq (first arglist)) :else (cons (first arglist) (spread (rest arglist)))))
-//---
-(function __clojure_fn_3158(){
-return (clojure.JS.def(clojure,"spread",(function __clojure_fn_3158_spread_3160(arglist_1){
-return (((clojure.nil_QMARK_.apply(null,[arglist_1]))?(null):(((clojure.nil_QMARK_.apply(null,[clojure.rest.apply(null,[arglist_1])]))?(clojure.seq.apply(null,[clojure.first.apply(null,[arglist_1])])):(((clojure.keyword("","else"))?(clojure.cons.apply(null,[clojure.first.apply(null,[arglist_1]),clojure.spread.apply(null,[clojure.rest.apply(null,[arglist_1])])])):(null)))))))})))}).apply(null,[]);
-// Skipping: (defn apply "Applies fn f to the argument list formed by prepending args to argseq." {:arglists (quote ([f args* argseq]))} [f & args] (. f (applyTo (spread args))))
-
-//======
-//(defn list* "Creates a new list containing the item prepended to more." [item & more] (spread (cons item more)))
-//---
-(function __clojure_fn_3170(){
-return (clojure.JS.def(clojure,"list_STAR_",clojure.JS.variadic(1,(function __clojure_fn_3170_list_STAR_3172(item_1){
-var more_2=clojure.JS.rest_args(this,arguments,1);
-return (clojure.spread.apply(null,[clojure.cons.apply(null,[item_1,more_2])]))}))))}).apply(null,[]);
-// Skipping: (defmacro delay "Takes a body of expressions and yields a Delay object than will\n invoke the body only the first time it is forced (with force), and\n will cache the result and return it on all subsequent force calls" [& body] (list (quote new) (quote clojure.lang.Delay) (list* (quote clojure/fn) [] body)))
-
-//======
-//(defn delay? "returns true if x is a Delay created with delay" [x] (instance? clojure.lang.Delay x))
-//---
-(function __clojure_fn_3182(){
-return (clojure.JS.def(clojure,"delay_QMARK_",(function __clojure_fn_3182_delay_QMARK_3184(x_1){
-return (clojure.instance_QMARK_.apply(null,[clojure.lang.Delay,x_1]))})))}).apply(null,[]);
-
-//======
-//(defn force "If x is a Delay, returns the (possibly cached) value of its expression, else returns x" [x] (. clojure.lang.Delay (force x)))
-//---
-(function __clojure_fn_3188(){
-return (clojure.JS.def(clojure,"force",(function __clojure_fn_3188_force_3190(x_1){
-return (clojure.lang.Delay.force(x_1))})))}).apply(null,[]);
-
-//======
-//(defn fnseq "Returns a seq object whose first is first and whose rest is the\n value produced by calling restfn with no arguments. restfn will be\n called at most once per step in the sequence, e.g. calling rest\n repeatedly on the head of the seq calls restfn once - the value it\n yields is cached." [first restfn] (new clojure.lang.FnSeq first restfn))
-//---
-(function __clojure_fn_3194(){
-return (clojure.JS.def(clojure,"fnseq",(function __clojure_fn_3194_fnseq_3196(first_1,restfn_2){
-return ((new clojure.lang.FnSeq(first_1,restfn_2)))})))}).apply(null,[]);
-// Skipping: (defmacro lazy-cons "Expands to code which produces a seq object whose first is\n first-expr and whose rest is rest-expr, neither of which is\n evaluated until first/rest is called. Each expr will be evaluated at most\n once per step in the sequence, e.g. calling first/rest repeatedly on the\n same node of the seq evaluates first/rest-expr once - the values they yield are\n cached." [first-expr & rest-expr] (list (quote new) (quote clojure.lang.LazyCons) (list (quote clojure/fn) (list [] first-expr) (list* [(gensym)] rest-expr))))
-
-//======
-//(defn cache-seq "Given a seq s, returns a lazy seq that will touch each element of s\n at most once, caching the results." [s] (when s (clojure.lang.CachedSeq. s)))
-//---
-(function __clojure_fn_3206(){
-return (clojure.JS.def(clojure,"cache_seq",(function __clojure_fn_3206_cache_seq_3208(s_1){
-return (((s_1)?((new clojure.lang.CachedSeq(s_1))):(null)))})))}).apply(null,[]);
-
-//======
-//(defn concat "Returns a lazy seq representing the concatenation of\tthe elements in the supplied colls." ([] nil) ([x] (seq x)) ([x y] (if (seq x) (lazy-cons (first x) (concat (rest x) y)) (seq y))) ([x y & zs] (let [cat (fn cat [xys zs] (if (seq xys) (lazy-cons (first xys) (cat (rest xys) zs)) (when zs (recur (first zs) (rest zs)))))] (cat (concat x y) zs))))
-//---
-(function __clojure_fn_3212(){
-return (clojure.JS.def(clojure,"concat",clojure.JS.variadic(2,(function __clojure_fn_3212_concat_3214(x_1,y_2){switch(arguments.length){
-case 1:return (clojure.seq.apply(null,[x_1]))
-case 2:return (((clojure.seq.apply(null,[x_1]))?((new clojure.lang.LazyCons((function __clojure_fn_3212_concat_3214_fn_3219(G__3218_1){switch(arguments.length){
-case 0:return (clojure.first.apply(null,[x_1]))}
-return (clojure.concat.apply(null,[clojure.rest.apply(null,[x_1]),y_2]))})))):(clojure.seq.apply(null,[y_2]))))