@@ -10384,56 +10384,6 @@ reduces them without incurring seq initialization"
1038410384
1038510385(declare Vector )
1038610386
10387- (defn- simple-map-entry [k v]
10388- (reify
10389- ICounted
10390- (-count [coll] 2 )
10391- IHash
10392- (-hash [coll] (hash-ordered-coll [k v]))
10393- ISequential
10394- IEquiv
10395- (-equiv [coll other] (equiv-sequential coll other))
10396- IVector
10397- (-assoc-n [_ n x]
10398- (case n
10399- 0 (simple-map-entry x v)
10400- 1 (simple-map-entry k x)
10401- (throw (js/Error. " Index out of bounds" ))))
10402- IAssociative
10403- (-assoc [node k v]
10404- (-assoc-n node k v))
10405- (-contains-key? [node k]
10406- (or (== k 0 ) (== k 1 )))
10407- ICollection
10408- (-conj [coll x]
10409- (if ^boolean LITE_MODE
10410- (Vector. nil #js [k v x] nil )
10411- [k v x]))
10412- IMapEntry
10413- (-key [_] k)
10414- (-val [_] v)
10415- ISeqable
10416- (-seq [_] (IndexedSeq. #js [k v] 0 nil ))
10417- IIndexed
10418- (-nth [_ i]
10419- (case i, 0 k, 1 v, (throw (js/Error. " Index out of bounds" ))))
10420- (-nth [_ i not-found]
10421- (case i, 0 k, 1 v, not-found))
10422- ILookup
10423- (-lookup [coll k] (-nth coll k nil ))
10424- (-lookup [coll k not-found] (-nth coll k not-found))
10425- IFind
10426- (-find [node x]
10427- (case x
10428- 0 (simple-map-entry 0 k)
10429- 1 (simple-map-entry 1 v)
10430- nil ))
10431- IFn
10432- (-invoke [coll k]
10433- (-nth coll k))
10434- (-invoke [coll k not-found]
10435- (-nth coll k not-found))))
10436-
1043710387(defn- pr-writer-impl
1043810388 [obj writer opts]
1043910389 (cond
@@ -10472,9 +10422,10 @@ reduces them without incurring seq initialization"
1047210422 (.map
1047310423 (js-keys obj)
1047410424 (fn [k]
10475- (simple-map-entry
10425+ (MapEntry.
1047610426 (cond-> k (some? (.match k #"^[A-Za-z_\*\+\? !\- '][\w\*\+\? !\- ']*$" )) keyword)
10477- (unchecked-get obj k))))
10427+ (unchecked-get obj k)
10428+ nil )))
1047810429 pr-writer writer opts))
1047910430
1048010431 (array? obj)
@@ -10655,10 +10606,10 @@ reduces them without incurring seq initialization"
1065510606 (when (or (keyword? k) (symbol? k))
1065610607 (if ns
1065710608 (when (= ns (namespace k))
10658- (.push lm (simple-map-entry (strip-ns k) v))
10609+ (.push lm (MapEntry. (strip-ns k) v nil ))
1065910610 (recur ns entries))
1066010611 (when-let [new-ns (namespace k)]
10661- (.push lm (simple-map-entry (strip-ns k) v))
10612+ (.push lm (MapEntry. (strip-ns k) v nil ))
1066210613 (recur new-ns entries))))
1066310614 #js [ns lm])))))
1066410615
@@ -12566,7 +12517,7 @@ reduces them without incurring seq initialization"
1256612517 (next [_]
1256712518 (let [k (aget strkeys i)]
1256812519 (set! i (inc i))
12569- (simple-map-entry (obj-map-key->keyword k) (unchecked-get strobj k)))))
12520+ (MapEntry. (obj-map-key->keyword k) (unchecked-get strobj k) nil ))))
1257012521
1257112522(deftype ObjMap [meta strkeys strobj ^:mutable __hash]
1257212523 Object
@@ -12621,7 +12572,7 @@ reduces them without incurring seq initialization"
1262112572 (when (pos? (alength strkeys))
1262212573 (prim-seq
1262312574 (.map (.sort strkeys obj-map-compare-keys)
12624- #(simple-map-entry (obj-map-key->keyword %) (unchecked-get strobj %))))))
12575+ #(MapEntry. (obj-map-key->keyword %) (unchecked-get strobj %) nil )))))
1262512576
1262612577 ICounted
1262712578 (-count [coll] (alength strkeys))
@@ -12822,7 +12773,7 @@ reduces them without incurring seq initialization"
1282212773 (loop [j 0 ]
1282312774 (when (< j len)
1282412775 (do
12825- (.push arr (simple-map-entry (aget bckt j) (aget bckt (inc j))))
12776+ (.push arr (MapEntry. (aget bckt j) (aget bckt (inc j)) nil ))
1282612777 (recur (+ j 2 )))))
1282712778 (recur (inc i)))
1282812779 (prim-seq arr))))))
0 commit comments