jolt/jolt-core/clojure/core
Yogthos 424ce75cf6 mutable deftype fields: (set! field val) in a method
deftype fields tagged ^:unsynchronized-mutable / ^:volatile-mutable can now be
reassigned in place from a method, as on the JVM. A jrec stores fields as cons
cells, so a new jolt-set-field! mutates the pair with set-cdr!. The deftype macro
rewrites (set! mutable-field v) in a method body to (set! (.-field inst) v), and
the analyzer compiles a (set! (.-field obj) v) target to jolt-set-field! — so
both the rewritten symbol form and an explicit interop (set! (.-root this) v) go
through one path. Field reads remain a snapshot at method entry, which is correct
for the universal read-then-set pattern (a repeated set! of the same field in one
call would read the entry value).

Closes the set!-of-local SCI failures: SCI load 202 -> 205/218.
2026-06-22 01:19:03 -04:00
..
00-kernel.clj Host interop fixes: ==/time/subvec/defonce + corpus cleanup 2026-06-21 15:36:41 -04:00
00-syntax.clj Scrub dangling Janet references; drop dead Janet-coupled files 2026-06-21 12:01:04 -04:00
10-seq.clj Scrub dangling Janet references; drop dead Janet-coupled files 2026-06-21 12:01:04 -04:00
20-coll.clj real BigDecimal type (bigdec, M literals) 2026-06-22 00:01:01 -04:00
25-sorted.clj sorted-map entries are real map-entries (jolt-jk23) 2026-06-21 16:43:05 -04:00
30-macros.clj mutable deftype fields: (set! field val) in a method 2026-06-22 01:19:03 -04:00
40-lazy.clj Scrub dangling Janet references; drop dead Janet-coupled files 2026-06-21 12:01:04 -04:00
50-io.clj *in* is a Reader, not a map 2026-06-21 23:45:24 -04:00