Skip to content

Commit

Permalink
Merge branch 'master' of github.com:clojure/clojurescript
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette committed Feb 26, 2015
2 parents 1dd5568 + 13276c5 commit b1d16f5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/clj/cljs/repl/node.clj
Expand Up @@ -81,7 +81,7 @@
([repl-env] (setup repl-env nil))
([repl-env opts]
(let [opts (merge {:output-dir ".cljs_node_repl"} opts)
output-dir (io/file (:output-dir opts))
output-dir (io/file (util/output-directory (:output-dir opts)))
_ (.mkdirs output-dir)
of (io/file output-dir "node_repl.js")
_ (spit of
Expand Down
26 changes: 13 additions & 13 deletions src/cljs/cljs/core.cljs
Expand Up @@ -466,22 +466,22 @@

;; http://smhasher.googlecode.com/svn/trunk/MurmurHash3.cpp
(def m3-seed 0)
(def m3-C1 0xcc9e2d51)
(def m3-C2 0x1b873593)
(def m3-C1 (int 0xcc9e2d51))
(def m3-C2 (int 0x1b873593))

(defn ^number m3-mix-K1 [k1]
(-> k1 (imul m3-C1) (int-rotate-left 15) (imul m3-C2)))
(-> (int k1) (imul m3-C1) (int-rotate-left 15) (imul m3-C2)))

(defn ^number m3-mix-H1 [h1 k1]
(-> h1 (bit-xor k1) (int-rotate-left 13) (imul 5) (+ 0xe6546b64)))
(int (-> (int h1) (bit-xor (int k1)) (int-rotate-left 13) (imul 5) (+ (int 0xe6546b64)))))

(defn ^number m3-fmix [h1 len]
(as-> h1 h1
(as-> (int h1) h1
(bit-xor h1 len)
(bit-xor h1 (unsigned-bit-shift-right h1 16))
(imul h1 0x85ebca6b)
(imul h1 (int 0x85ebca6b))
(bit-xor h1 (unsigned-bit-shift-right h1 13))
(imul h1 0xc2b2ae35)
(imul h1 (int 0xc2b2ae35))
(bit-xor h1 (unsigned-bit-shift-right h1 16))))

(defn ^number m3-hash-int [in]
Expand Down Expand Up @@ -5346,8 +5346,8 @@ reduces them without incurring seq initialization"
(es6-iterator (vals coll)))
(has [coll k]
(contains? coll k))
(get [coll k]
(-lookup coll k))
(get [coll k not-found]
(-lookup coll k not-found))
(forEach [coll f]
(doseq [[k v] coll]
(f v k)))
Expand Down Expand Up @@ -6219,8 +6219,8 @@ reduces them without incurring seq initialization"
(es6-iterator (vals coll)))
(has [coll k]
(contains? coll k))
(get [coll k]
(-lookup coll k))
(get [coll k not-found]
(-lookup coll k not-found))
(forEach [coll f]
(doseq [[k v] coll]
(f v k)))
Expand Down Expand Up @@ -6993,8 +6993,8 @@ reduces them without incurring seq initialization"
(es6-iterator (vals coll)))
(has [coll k]
(contains? coll k))
(get [coll k]
(-lookup coll k))
(get [coll k not-found]
(-lookup coll k not-found))
(forEach [coll f]
(doseq [[k v] coll]
(f v k)))
Expand Down
1 change: 1 addition & 0 deletions test/cljs/cljs/core_test.cljs
Expand Up @@ -1417,6 +1417,7 @@
(is (.-done (.next iter)))))
(is (.has {:foo "bar"} :foo))
(is (= (.get {:foo "bar"} :foo) "bar"))
(is (= (.get {:foo "bar"} :bar :default) :default))
(let [iter (.keys {:foo "bar" :baz "woz"})]
(testing "map key iteration"
(is (#{:foo :baz} (.-value (.next iter))))
Expand Down

0 comments on commit b1d16f5

Please sign in to comment.