Chez Phase 2 (inc X): #inst / #uuid literals + java.time (jolt-at0a)

The analyzer lowers a #inst/#uuid tagged form to a :inst/:uuid IR leaf, mirroring
the existing :regex node: the Janet back end punts to the interpreter (its
data-readers parse the literal, so seed behavior is unchanged), the Chez back end
emits jolt-inst-from-string / jolt-uuid-from-string.

host/chez/inst-time.ss is the Chez-native value layer: a jinst record holding
epoch ms (RFC3339 parsed via Hinnant civil/days math, with Clojure's partial
defaults and +/-hh:mm offsets), wired into jolt-get (so the overlay inst?/inst-ms
read it), jolt= / jolt-hash (instant identity as a map key), pr-str (#inst
"...-00:00"), str, type, and instance? java.util.Date. The java.time surface
(DateTimeFormatter ofPattern/ISO_LOCAL_DATE_TIME/ofLocalized*, the pattern engine,
Instant, ZoneId, LocalDateTime, FormatStyle, Locale, Date) ports java_base.janet
over host-static.ss's registries.

Corpus 2202->2238, 0 new divergences; clears the whole 'unsupported form'
emit-fail bucket. Full Janet gate green (analyzer/backend changes are
behaviour-preserving — #inst still parses through the interpreter's data-readers
on the seed).
This commit is contained in:
Yogthos 2026-06-19 11:05:22 -04:00
parent 62e636e52c
commit c70f3bae34
10 changed files with 418 additions and 1 deletions

View file

@ -261,8 +261,16 @@
# (slurp/string/char[]/File), File .toURL/.toURI + a url jhost, slurp draining a
# StringReader, char-array, and with-open's __close seam over jhost readers + plain
# :close maps; all in host/chez/io.ss, no analyzer change) 2202.
# jolt-at0a inc X (#inst / #uuid literals + java.time formatting — the analyzer
# lowers a #inst/#uuid tagged form to a :inst/:uuid IR leaf (mirroring :regex):
# the Janet back end punts to the interpreter's data-readers, the Chez back end
# emits jolt-inst-from-string / jolt-uuid-from-string. host/chez/inst-time.ss is
# the jinst value (RFC3339 ms via Hinnant civil/days math, partial defaults +
# offsets, = / hash / pr-str / get-as-overlay-seam) plus the DateTimeFormatter
# pattern engine + Instant/ZoneId/LocalDateTime/FormatStyle/Locale/Date shims.
# This cleared the whole "unsupported form" emit-fail bucket) 2238.
# Strided runs scale down.
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2202")))
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2238")))
(def floor (if (os/getenv "JOLT_CORPUS_LIMIT") 0 base-floor))
(when (or (> (length diverged) 0) (< pass floor))
(printf "REGRESSION: pass %d < floor %d or %d new divergence(s)" pass floor (length diverged)))