Chez Phase 3 inc 4: swap jolt-chez to the jolt.backend-scheme emitter; full corpus parity
driver.janet now compiles IR via the portable Clojure emitter (jolt.backend- scheme) instead of emit.janet, at every entry point (compile-program, emit-core- prelude, eval-e-with-prelude). The emitter is loaded into the ctx and called like the analyzer. emit.janet stays only as the emit/program string-wrapper until program assembly ports to Clojure with compile-from-source; its emit fn is no longer called anywhere (emit-test's truthy-elision helper now uses the new d/scheme-emit too). This takes the IR->Scheme emitter off Janet. A form-by-form diff of the two emitters over the whole prelude found one gap: emit-const missed char literals because a :jolt/type-tagged struct is not a plain jolt map? — switched to the form-char? host contract. Diff then 0. jolt-chez prelude fingerprint now includes backend_scheme.clj + host_iface.janet. Gate: full prelude corpus 2280/2494, NEW divergence 0, same buckets as the Phase-2 emit.janet floor (36 emit-fail, 170 crash) — the Clojure emitter is byte-for- behavior identical. emit-test 331/331 (now via the Clojure emitter), emit-parity 58/58. jolt-duot.
This commit is contained in:
parent
f9a665b3c4
commit
2a33da87d8
5 changed files with 48 additions and 13 deletions
|
|
@ -17,7 +17,8 @@
|
|||
(def parts @[])
|
||||
(each tf d/core-tier-files
|
||||
(array/push parts (slurp (string "jolt-core/clojure/core/" tf ".clj"))))
|
||||
(each f ["host/chez/emit.janet" "host/chez/driver.janet" "host/chez/rt.ss"
|
||||
(each f ["jolt-core/jolt/backend_scheme.clj" "src/jolt/host_iface.janet"
|
||||
"host/chez/emit.janet" "host/chez/driver.janet" "host/chez/rt.ss"
|
||||
"host/chez/values.ss" "host/chez/collections.ss" "host/chez/seq.ss"
|
||||
"host/chez/atoms.ss" "host/chez/predicates.ss" "host/chez/regex.ss"
|
||||
"host/chez/ns.ss" "host/chez/post-prelude.ss" "host/chez/natives-meta.ss"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue