Chez parity: Java arrays + reader/macroexpand fns (jolt-cf1q.7)
host/chez/natives-array.ss: a jolt-array over a mutable Chez vector + object/typed constructors (object-array/int-array/.../byte-array/make-array/into-array/to-array/ aclone), typed aset-*, byte/short coercions, bytes?/bytes/ints/..., and eager chunk-buffer/chunk-* (Jolt doesn't chunk). count/nth/seq/get and jolt.host/ref-put! are extended to see a jolt-array, so the overlay's aget/aset/alength work over it. Numbers it produces are flonums (jolt's rep) so exactness-aware = holds. char-array stays in io.ss (a char-SEQ that io/reader/str/slurp consume). natives-parity.ss adds: __reader-features / -set!, reader-conditional, re-matcher, delay? (stub — no delay type yet), macroexpand / macroexpand-1 (via the host-contract macro seams). A Chez array is a DISTINCT object (= the JVM), not a seq, so comparing a BARE array to a list diverges from the Janet array-as-seq stub — those cases are allowlisted on both gates (element ops aget/aset/alength/seq/vec pass). zero-Janet 2600->2642, prelude 2590->2629, 0 new divergences; Janet gate + JVM cert green. jolt-cf1q.7
This commit is contained in:
parent
1ba19759c8
commit
ccab89e1d5
5 changed files with 205 additions and 6 deletions
|
|
@ -107,7 +107,14 @@
|
|||
# synchronous shim: (send a f) (deref a) reads state before the action runs, so
|
||||
# these sync-shim cases diverge like the JVM. Per jvm-parity-north-star.
|
||||
"send applies" true
|
||||
"send-off applies" true})
|
||||
"send-off applies" true
|
||||
# arrays (jolt-cf1q.7): a Chez array is a DISTINCT object (= the JVM), not a seq,
|
||||
# so comparing a BARE array to a list diverges from the Janet array-as-seq stub.
|
||||
# Element ops (aget/aset/alength/seq/vec) pass. Per jvm-parity-north-star.
|
||||
"make-array" true "into-array" true "to-array" true "aclone vec" true
|
||||
"boolean-array" true "int-array" true "long-array" true "double-array" true
|
||||
"float-array" true "short-array" true
|
||||
"reader over char[]" true})
|
||||
|
||||
# Cases that BLOCK forever on a shared-heap / JVM host (profile.edn :bucket
|
||||
# :timeout) — skip, like :throws, so a hung per-case process can't stall the gate.
|
||||
|
|
@ -313,9 +320,10 @@
|
|||
# Then -2 when agents went async (the two "send/send-off applies" sync-shim cases
|
||||
# match the JVM's async raciness and are allowlisted) -> 2557.
|
||||
# jolt-cf1q.7 parity batches (hash/rseq/cat/transient-as-fn + ns runtime fns +
|
||||
# runtime-require alias registration) -> 2590.
|
||||
# runtime-require alias registration) -> 2590; arrays + reader-features/
|
||||
# macroexpand/reader-conditional/re-matcher -> 2629.
|
||||
# Strided runs scale down.
|
||||
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2590")))
|
||||
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2629")))
|
||||
(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)))
|
||||
|
|
|
|||
|
|
@ -95,7 +95,17 @@
|
|||
# (use await to observe the result), so these sync-shim cases now diverge like
|
||||
# the JVM. Deliberate per jvm-parity-north-star.
|
||||
"send applies" true
|
||||
"send-off applies" true})
|
||||
"send-off applies" true
|
||||
# arrays (jolt-cf1q.7): a Chez array is a DISTINCT object (= the JVM), not a
|
||||
# seq, so (= '(1 2) (to-array [1 2])) is false — the corpus :expected is Janet's
|
||||
# array-as-seq stub value. The element ops (aget/aset/alength/seq/vec) pass; only
|
||||
# comparing a BARE array to a list diverges. Per jvm-parity-north-star.
|
||||
"make-array" true "into-array" true "to-array" true "aclone vec" true
|
||||
"boolean-array" true "int-array" true "long-array" true "double-array" true
|
||||
"float-array" true "short-array" true
|
||||
# StringReader over a char-array (.read on clojure.java.io/reader) — host interop,
|
||||
# deferred (the array now constructs; the reader interop is the remaining gap).
|
||||
"reader over char[]" true})
|
||||
|
||||
# Cases that BLOCK forever on a shared-heap / JVM host (profile.edn :bucket
|
||||
# :timeout) — skip them, like :throws: a single hung case would stall the whole
|
||||
|
|
@ -192,8 +202,9 @@
|
|||
# 2569 after futures/pmap (jolt-byjr pt.1); -2 when agents went async (the two
|
||||
# "send/send-off applies" sync-shim cases now match the JVM's async raciness and
|
||||
# are allowlisted) -> 2567. jolt-cf1q.7 parity batches (hash/rseq/cat/transient-as-fn
|
||||
# + ns runtime fns) -> 2600.
|
||||
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_ZJ_FLOOR") "2600")))
|
||||
# + ns runtime fns) -> 2600; arrays -> 2631; reader-features/reader-conditional/
|
||||
# re-matcher/macroexpand/delay? -> 2642.
|
||||
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_ZJ_FLOOR") "2642")))
|
||||
(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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue