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
|
|
@ -325,6 +325,11 @@
|
|||
;; transients.ss, values.ss (jolt-hash), seq.ss.
|
||||
(load "host/chez/natives-parity.ss")
|
||||
|
||||
;; Java-style arrays (jolt-cf1q.7): object/typed array constructors + a jolt-array
|
||||
;; backing; extends count/nth/seq/get/ref-put! so the overlay aget/aset/alength see
|
||||
;; it. After the dispatchers it chains.
|
||||
(load "host/chez/natives-array.ss")
|
||||
|
||||
;; syntax-quote form builders (jolt-r9lm, inc6b): __sqcat/__sqvec/__sqmap/__sqset/
|
||||
;; __sq1, def-var!'d into clojure.core. A cross-compiled macro expander (analyzer
|
||||
;; on Chez, inc6b) calls these to build its expansion as reader forms. Needs the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue