Skip to content

Commit b1d16f5

Browse files
committed
Merge branch 'master' of github.com:clojure/clojurescript
2 parents 1dd5568 + 13276c5 commit b1d16f5

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

src/clj/cljs/repl/node.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
([repl-env] (setup repl-env nil))
8282
([repl-env opts]
8383
(let [opts (merge {:output-dir ".cljs_node_repl"} opts)
84-
output-dir (io/file (:output-dir opts))
84+
output-dir (io/file (util/output-directory (:output-dir opts)))
8585
_ (.mkdirs output-dir)
8686
of (io/file output-dir "node_repl.js")
8787
_ (spit of

src/cljs/cljs/core.cljs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -466,22 +466,22 @@
466466

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

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

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

478478
(defn ^number m3-fmix [h1 len]
479-
(as-> h1 h1
479+
(as-> (int h1) h1
480480
(bit-xor h1 len)
481481
(bit-xor h1 (unsigned-bit-shift-right h1 16))
482-
(imul h1 0x85ebca6b)
482+
(imul h1 (int 0x85ebca6b))
483483
(bit-xor h1 (unsigned-bit-shift-right h1 13))
484-
(imul h1 0xc2b2ae35)
484+
(imul h1 (int 0xc2b2ae35))
485485
(bit-xor h1 (unsigned-bit-shift-right h1 16))))
486486

487487
(defn ^number m3-hash-int [in]
@@ -5346,8 +5346,8 @@ reduces them without incurring seq initialization"
53465346
(es6-iterator (vals coll)))
53475347
(has [coll k]
53485348
(contains? coll k))
5349-
(get [coll k]
5350-
(-lookup coll k))
5349+
(get [coll k not-found]
5350+
(-lookup coll k not-found))
53515351
(forEach [coll f]
53525352
(doseq [[k v] coll]
53535353
(f v k)))
@@ -6219,8 +6219,8 @@ reduces them without incurring seq initialization"
62196219
(es6-iterator (vals coll)))
62206220
(has [coll k]
62216221
(contains? coll k))
6222-
(get [coll k]
6223-
(-lookup coll k))
6222+
(get [coll k not-found]
6223+
(-lookup coll k not-found))
62246224
(forEach [coll f]
62256225
(doseq [[k v] coll]
62266226
(f v k)))
@@ -6993,8 +6993,8 @@ reduces them without incurring seq initialization"
69936993
(es6-iterator (vals coll)))
69946994
(has [coll k]
69956995
(contains? coll k))
6996-
(get [coll k]
6997-
(-lookup coll k))
6996+
(get [coll k not-found]
6997+
(-lookup coll k not-found))
69986998
(forEach [coll f]
69996999
(doseq [[k v] coll]
70007000
(f v k)))

test/cljs/cljs/core_test.cljs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,7 @@
14171417
(is (.-done (.next iter)))))
14181418
(is (.has {:foo "bar"} :foo))
14191419
(is (= (.get {:foo "bar"} :foo) "bar"))
1420+
(is (= (.get {:foo "bar"} :bar :default) :default))
14201421
(let [iter (.keys {:foo "bar" :baz "woz"})]
14211422
(testing "map key iteration"
14221423
(is (#{:foo :baz} (.-value (.next iter))))

0 commit comments

Comments
 (0)