Chez Phase 2 (inc E): meta / with-meta

meta/with-meta resolved to jolt-nil. Chez values don't carry metadata, so
collections use an identity-keyed side-table: with-meta returns a fresh copy of
the value (new identity) and records its meta there, leaving the original
unchanged (immutable-with-meta) and dropping meta on a later copying op. Symbols
carry meta in their existing field; meta on a non-metadatable value is nil.
vary-meta works over these. with-meta on a fn stays fn? (jolt is lenient).

emit.janet carries a quoted symbol's reader metadata (^:foo bar) onto the
emitted jolt-symbol so (meta 'x) sees it; symbol = still ignores meta.

Prelude parity 1701 -> 1723, 0 new divergences. jolt-rkbc.
This commit is contained in:
Yogthos 2026-06-18 12:16:48 -04:00
parent f0419b560d
commit b8e4e78372
4 changed files with 54 additions and 4 deletions

View file

@ -193,6 +193,10 @@
;; transients).
(load "host/chez/records.ss")
;; metadata (jolt-rkbc, Phase 2 inc E): meta / with-meta over an identity-keyed
;; side-table. After records.ss (jrec) + the collection ctors it copies.
(load "host/chez/natives-meta.ss")
;; dynamic vars (jolt-9ls5): *clojure-version* / *unchecked-math* constants the seed
;; binds natively. After collections.ss (jolt-hash-map) + def-var!.
(load "host/chez/dynamic-vars.ss")