@@ -3110,7 +3110,7 @@ reduces them without incurring seq initialization"
31103110 ([] " " )
31113111 ([x] (if (nil? x)
31123112 " "
3113- (.join #js [x] " " )))
3113+ (.toString x )))
31143114 ([x & ys]
31153115 (loop [sb (StringBuffer. (str x)) more ys]
31163116 (if more
@@ -6002,6 +6002,10 @@ reduces them without incurring seq initialization"
60026002 (-empty [coll]
60036003 ())
60046004
6005+ ICounted
6006+ (-count [coll]
6007+ (- (-count vec) (+ i off)))
6008+
60056009 IChunkedSeq
60066010 (-chunked-first [coll]
60076011 (array-chunk node off))
@@ -12611,10 +12615,14 @@ reduces them without incurring seq initialization"
1261112615 (let [k (if-not (keyword? k) k (keyword->obj-map-key k))]
1261212616 (if (string? k)
1261312617 (if-not (nil? (scan-array 1 k strkeys))
12614- (let [new-strobj (obj-clone strobj strkeys)]
12615- (gobject/set new-strobj k v)
12616- (ObjMap. meta strkeys new-strobj nil )) ; overwrite
12617- (let [new-strobj (obj-clone strobj strkeys) ; append
12618+ (if (identical? v (gobject/get strobj k))
12619+ coll
12620+ ; overwrite
12621+ (let [new-strobj (obj-clone strobj strkeys)]
12622+ (gobject/set new-strobj k v)
12623+ (ObjMap. meta strkeys new-strobj nil )))
12624+ ; append
12625+ (let [new-strobj (obj-clone strobj strkeys)
1261812626 new-keys (aclone strkeys)]
1261912627 (gobject/set new-strobj k v)
1262012628 (.push new-keys k)
@@ -12820,10 +12828,12 @@ reduces them without incurring seq initialization"
1282012828 i (scan-array-equiv 2 k new-bucket)]
1282112829 (aset new-hashobj h new-bucket)
1282212830 (if (some? i)
12823- (do
12824- ; found key, replace
12825- (aset new-bucket (inc i) v)
12826- (HashMap. meta count new-hashobj nil ))
12831+ (if (identical? v (aget new-bucket (inc i)))
12832+ coll
12833+ (do
12834+ ; found key, replace
12835+ (aset new-bucket (inc i) v)
12836+ (HashMap. meta count new-hashobj nil )))
1282712837 (do
1282812838 ; did not find key, append
1282912839 (.push new-bucket k v)
@@ -12962,7 +12972,10 @@ reduces them without incurring seq initialization"
1296212972
1296312973 ICollection
1296412974 (-conj [coll o]
12965- (Set. meta (assoc hash-map o o) nil ))
12975+ (let [new-hash-map (assoc hash-map o o)]
12976+ (if (identical? new-hash-map hash-map)
12977+ coll
12978+ (Set. meta new-hash-map nil ))))
1296612979
1296712980 IEmptyableCollection
1296812981 (-empty [coll] (with-meta (. Set -EMPTY) meta))
0 commit comments