diff options
author | Chouser <chouser@n01se.net> | 2009-01-25 05:04:31 +0000 |
---|---|---|
committer | Chouser <chouser@n01se.net> | 2009-01-25 05:04:31 +0000 |
commit | e391c855d57ada7756b7cae5548bff80cc9e5fec (patch) | |
tree | 5d261e2ee1911e3b3d176566bfb8ed76d3eb227d /clojurescript/support-for-clojurescript.patch | |
parent | 5861a8726e657fd36a3f1b5f016f5eb9c12cdde3 (diff) |
ClojureScript: add clojure.lang.Util.equiv()
Diffstat (limited to 'clojurescript/support-for-clojurescript.patch')
-rw-r--r-- | clojurescript/support-for-clojurescript.patch | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/clojurescript/support-for-clojurescript.patch b/clojurescript/support-for-clojurescript.patch index 88516588..8d8303ad 100644 --- a/clojurescript/support-for-clojurescript.patch +++ b/clojurescript/support-for-clojurescript.patch @@ -1,11 +1,11 @@ -commit f4468e8764c62122b91ba991a102c7ab0ca67a9c +commit cef3bc5f654eb56def1bcedac661fb681ca6ae9e Author: Chouser <chouser@n01se.net> Date: Fri Jan 16 02:47:42 2009 -0500 ClojureScript support diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj -index d21c3f0..e5f294a 100644 +index 9b18b00..297eb71 100644 --- a/src/clj/clojure/core.clj +++ b/src/clj/clojure/core.clj @@ -321,7 +321,7 @@ @@ -17,7 +17,7 @@ index d21c3f0..e5f294a 100644 (defn symbol? -@@ -553,7 +553,7 @@ +@@ -559,7 +559,7 @@ {:inline (fn [x y] `(. clojure.lang.Numbers (add ~x ~y))) :inline-arities #{2}} ([] 0) @@ -26,7 +26,7 @@ index d21c3f0..e5f294a 100644 ([x y] (. clojure.lang.Numbers (add x y))) ([x y & more] (reduce + (+ x y) more))) -@@ -563,7 +563,7 @@ +@@ -569,7 +569,7 @@ {:inline (fn [x y] `(. clojure.lang.Numbers (multiply ~x ~y))) :inline-arities #{2}} ([] 1) @@ -35,7 +35,7 @@ index d21c3f0..e5f294a 100644 ([x y] (. clojure.lang.Numbers (multiply x y))) ([x y & more] (reduce * (* x y) more))) -@@ -1484,12 +1484,12 @@ +@@ -1501,12 +1501,12 @@ (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." @@ -51,7 +51,7 @@ index d21c3f0..e5f294a 100644 (new clojure.lang.Range start end) (take (- end start) (iterate inc start)))) ([start end step] -@@ -1556,7 +1556,7 @@ +@@ -1573,7 +1573,7 @@ ([#^java.util.Comparator comp coll] (when (and coll (not (zero? (count coll)))) (let [a (to-array coll)] @@ -60,7 +60,7 @@ index d21c3f0..e5f294a 100644 (seq a))))) (defn sort-by -@@ -1646,7 +1646,7 @@ +@@ -1663,7 +1663,7 @@ [& agents] (io! "await in transaction" (when *agent* @@ -69,7 +69,7 @@ index d21c3f0..e5f294a 100644 (let [latch (new java.util.concurrent.CountDownLatch (count agents)) count-down (fn [agent] (. latch (countDown)) agent)] (doseq [agent agents] -@@ -1666,7 +1666,7 @@ +@@ -1683,7 +1683,7 @@ [timeout-ms & agents] (io! "await-for in transaction" (when *agent* @@ -78,7 +78,7 @@ index d21c3f0..e5f294a 100644 (let [latch (new java.util.concurrent.CountDownLatch (count agents)) count-down (fn [agent] (. latch (countDown)) agent)] (doseq [agent agents] -@@ -1990,6 +1990,7 @@ +@@ -2007,6 +2007,7 @@ (import '(java.lang.reflect Array)) @@ -86,7 +86,7 @@ index d21c3f0..e5f294a 100644 (defn alength "Returns the length of the Java array. Works on arrays of all -@@ -2009,7 +2010,7 @@ +@@ -2026,7 +2027,7 @@ {:inline (fn [a i] `(. clojure.lang.RT (aget ~a ~i))) :inline-arities #{2}} ([array idx] @@ -95,7 +95,7 @@ index d21c3f0..e5f294a 100644 ([array idx & idxs] (apply aget (aget array idx) idxs))) -@@ -2019,7 +2020,7 @@ +@@ -2036,7 +2037,7 @@ {:inline (fn [a i v] `(. clojure.lang.RT (aset ~a ~i ~v))) :inline-arities #{3}} ([array idx val] @@ -104,7 +104,7 @@ index d21c3f0..e5f294a 100644 val) ([array idx idx2 & idxv] (apply aset (aget array idx) idx2 idxv))) -@@ -2176,6 +2177,10 @@ +@@ -2193,6 +2194,10 @@ "Returns a set of the distinct elements of coll." [coll] (apply hash-set coll)) @@ -115,7 +115,7 @@ index d21c3f0..e5f294a 100644 (defn #^{:private true} filter-key [keyfn pred amap] (loop [ret {} es (seq amap)] -@@ -2211,7 +2216,7 @@ +@@ -2228,7 +2233,7 @@ [x] (if (instance? clojure.lang.Namespace x) x @@ -124,7 +124,7 @@ index d21c3f0..e5f294a 100644 (defn ns-name "Returns the name of the namespace, a symbol." -@@ -2244,7 +2249,7 @@ +@@ -2261,7 +2266,7 @@ (defn ns-imports "Returns a map of the import mappings for the namespace." [ns] @@ -133,7 +133,7 @@ index d21c3f0..e5f294a 100644 (defn refer "refers to all public vars of ns, subject to filters. -@@ -2262,7 +2267,8 @@ +@@ -2279,7 +2284,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] @@ -143,7 +143,7 @@ index d21c3f0..e5f294a 100644 fs (apply hash-map filters) nspublics (ns-publics ns) rename (or (:rename fs) {}) -@@ -2394,7 +2400,7 @@ +@@ -2411,7 +2417,7 @@ true) (= firstb :as) (pb ret (second bs) gvec) :else (if seen-rest? @@ -152,7 +152,7 @@ index d21c3f0..e5f294a 100644 (recur (pb ret firstb (list `nth gvec n nil)) (inc n) (rest bs) -@@ -2425,7 +2431,7 @@ +@@ -2442,7 +2448,7 @@ (symbol? b) (-> bvec (conj b) (conj v)) (vector? b) (pvec bvec b v) (map? b) (pmap bvec b v) @@ -161,7 +161,7 @@ index d21c3f0..e5f294a 100644 process-entry (fn [bvec b] (pb bvec (key b) (val b)))] (if (every? symbol? (keys bmap)) bindings -@@ -2573,7 +2579,7 @@ +@@ -2590,7 +2596,7 @@ StringWriter. Returns the string created by any nested printing calls." [& body] @@ -170,7 +170,7 @@ index d21c3f0..e5f294a 100644 (binding [*out* s#] ~@body (str s#)))) -@@ -2619,7 +2625,7 @@ +@@ -2636,7 +2642,7 @@ logical true." [x] `(when-not ~x @@ -179,7 +179,7 @@ index d21c3f0..e5f294a 100644 (defn test "test [v] finds fn at key :test in var metadata and calls it, -@@ -2693,7 +2699,7 @@ +@@ -2710,7 +2716,7 @@ (defn rand "Returns a random floating point number between 0 (inclusive) and 1 (exclusive)." @@ -188,7 +188,7 @@ index d21c3f0..e5f294a 100644 ([n] (* n (rand)))) (defn rand-int -@@ -2803,7 +2809,7 @@ +@@ -2820,7 +2826,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))] @@ -197,7 +197,7 @@ index d21c3f0..e5f294a 100644 (loop [c (. r (read))] (if (neg? c) (str sb) -@@ -3087,10 +3093,6 @@ +@@ -3104,10 +3110,6 @@ (send-off agt fill) (drain)))) @@ -208,7 +208,7 @@ index d21c3f0..e5f294a 100644 (defn alter-var-root "Atomically alters the root binding of var v by applying f to its current value plus any args" -@@ -3176,7 +3178,7 @@ +@@ -3193,7 +3195,7 @@ relationships." ([tag] (descendants global-hierarchy tag)) ([h tag] (if (class? tag) @@ -217,7 +217,7 @@ index d21c3f0..e5f294a 100644 (not-empty (get (:descendants h) tag))))) (defn derive -@@ -3206,9 +3208,9 @@ +@@ -3223,9 +3225,9 @@ (or (when-not (contains? (tp tag) parent) (when (contains? (ta tag) parent) @@ -229,7 +229,7 @@ index d21c3f0..e5f294a 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)}) -@@ -3349,7 +3351,7 @@ +@@ -3366,7 +3368,7 @@ [pred fmt & args] (when pred (let [message (apply format fmt args) @@ -301,7 +301,7 @@ index 7a79a90..1ecc597 100644 (defmethod print-method java.math.BigDecimal [b, #^Writer w] (.write w (str b)) diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java -index cee5002..e303b4f 100644 +index d9033ac..eb4890a 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -202,7 +202,8 @@ static final public Var NEXT_LOCAL_NUM = Var.create(0); @@ -325,7 +325,7 @@ index cee5002..e303b4f 100644 } diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java -index f5d97e8..c5b3ef4 100644 +index a277f89..699c0d1 100644 --- a/src/jvm/clojure/lang/RT.java +++ b/src/jvm/clojure/lang/RT.java @@ -32,6 +32,9 @@ static final public Boolean T = Boolean.TRUE;//Keyword.intern(Symbol.create(null |