Skip to content

Commit a750e92

Browse files
committed
Update embedded Grenadine to 0.1.12
Sync the primitive loop counter fixes from Grenadine 0.1.12. Preserve Glojure-specific XML host integration while updating vendored code. Avoid JVM auto-boxing warnings in downstream source compilation.
1 parent f87e10b commit a750e92

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

‎pkg/stdlib/grenadine/expander.cljc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
original-coordinate
296296
(get default-deps lib))]
297297
(if (contains? provided-libs (base-lib lib))
298-
(recur pending queue index version-map exclusions cuts
298+
(recur pending queue (long index) version-map exclusions cuts
299299
order
300300
(if trace?
301301
(conj trace
@@ -313,7 +313,7 @@
313313
{:warning :unsupported-coordinate
314314
:lib lib
315315
:coordinate coordinate})
316-
(recur pending queue index version-map exclusions cuts
316+
(recur pending queue (long index) version-map exclusions cuts
317317
order trace))
318318
(let [id (coord-id lib coordinate)
319319
decision
@@ -356,7 +356,7 @@
356356
:include (boolean include?)
357357
:reason reason})
358358
trace)]
359-
(recur pending queue index version-map
359+
(recur pending queue (long index) version-map
360360
(:exclusions update) (:cuts update)
361361
(if include? (conj order lib) order)
362362
trace)))))

‎pkg/stdlib/grenadine/pom.cljc‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@
142142
(= \{ (nth value (inc i))))
143143
(if-let [end (find-property-end value (+ i 2))]
144144
(let [key (subs value (+ i 2) end)
145-
replacement (property-value properties key trail)]
146-
(recur (inc end)
147-
(inc end)
145+
replacement (property-value properties key trail)
146+
next-index (long (inc end))]
147+
(recur next-index
148+
next-index
148149
(conj pieces
149150
(subs value piece-start i)
150151
(if (nil? replacement)

‎pkg/stdlib/grenadine/version.cljc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
(range-error spec "an interval is missing its closing bracket"))
292292
(let [closer (nth value end)
293293
content (subs value (inc index) end)]
294-
(recur (inc end)
294+
(recur (long (inc end))
295295
(conj result (interval spec opener closer content)))))))))))
296296

297297
(defn version-range?

‎pkg/stdlib/grenadine/xml.cljc‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,20 +256,20 @@
256256
(cond
257257
(starts-at? source i "<!--")
258258
(if-let [end (find-token source (+ i 4) "-->")]
259-
(recur (+ end 3) stack roots)
259+
(recur (long (+ end 3)) stack roots)
260260
(xml-error source i "Unterminated XML comment"))
261261

262262
(starts-at? source i "<?")
263263
(if-let [end (find-token source (+ i 2) "?>")]
264-
(recur (+ end 2) stack roots)
264+
(recur (long (+ end 2)) stack roots)
265265
(xml-error source i "Unterminated XML processing instruction"))
266266

267267
(starts-at? source i "<![CDATA[")
268268
(if-let [end (find-token source (+ i 9) "]]>")]
269269
(let [text (source-slice source (+ i 9) end)
270270
[next-stack next-roots]
271271
(append-content stack roots text)]
272-
(recur (+ end 3) next-stack next-roots))
272+
(recur (long (+ end 3)) next-stack next-roots))
273273
(xml-error source i "Unterminated XML CDATA section"))
274274

275275
(starts-at? source i "</")
@@ -286,7 +286,7 @@
286286
(str "Mismatched XML closing tag: " name)))
287287
(let [[next-stack next-roots]
288288
(append-content (pop stack) roots node)]
289-
(recur (inc close) next-stack next-roots))))
289+
(recur (long (inc close)) next-stack next-roots))))
290290

291291
(starts-at? source i "<!")
292292
(xml-error source i
@@ -298,9 +298,9 @@
298298
(if self-closing?
299299
(let [[next-stack next-roots]
300300
(append-content stack roots node)]
301-
(recur next-i next-stack next-roots))
302-
(recur next-i (conj stack node) roots))))
301+
(recur (long next-i) next-stack next-roots))
302+
(recur (long next-i) (conj stack node) roots))))
303303
(let [end (or (find-char source i "<") (count source))
304304
text (decode-text source i end)
305305
[next-stack next-roots] (append-content stack roots text)]
306-
(recur end next-stack next-roots)))))))
306+
(recur (long end) next-stack next-roots)))))))

0 commit comments

Comments
 (0)