Chez Phase 1 (increment 3r): dynamic-var constants
host/chez/dynamic-vars.ss binds the two seed-native dynamic vars that aren't
emitted into the prelude: *clojure-version* (the {:major 1 :minor 11 ...} map) and
*unchecked-math* (false). Removes their two run-corpus-prelude allowlist entries
(now 11, all passing).
*ns* is deferred to jolt-b4kl: it needs a namespace value that is not a map yet
answers (get ns :name) for the overlay ns-name, plus str/find-ns support.
Parity 1530 -> 1532/2497, 0 new divergences. emit-test 305/305.
This commit is contained in:
parent
02139af0a1
commit
d7420deecb
5 changed files with 41 additions and 4 deletions
16
host/chez/dynamic-vars.ss
Normal file
16
host/chez/dynamic-vars.ss
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
;; dynamic vars (jolt-9ls5) — the handful of clojure.core dynamic vars the seed
|
||||
;; binds natively (src/jolt/core.janet) that aren't emitted into the prelude, so
|
||||
;; they var-deref to nil on Chez. These two are plain constants; *ns* (a namespace
|
||||
;; object) needs a value type with get-see-through and map?=false and is tracked
|
||||
;; separately. Loaded from rt.ss after the value model + def-var!.
|
||||
|
||||
;; *clojure-version* — a jolt map {:major 1 :minor 11 :incremental 0 :qualifier nil}
|
||||
;; (jolt is all-flonum, so the numbers are flonums).
|
||||
(def-var! "clojure.core" "*clojure-version*"
|
||||
(jolt-hash-map (keyword #f "major") 1.0
|
||||
(keyword #f "minor") 11.0
|
||||
(keyword #f "incremental") 0.0
|
||||
(keyword #f "qualifier") jolt-nil))
|
||||
|
||||
;; *unchecked-math* — jolt does no unchecked-math elision; the var reads false.
|
||||
(def-var! "clojure.core" "*unchecked-math*" #f)
|
||||
|
|
@ -170,3 +170,7 @@
|
|||
;; (seq.ss), jolt=/key-hash/jolt-hash-map (collections.ss), jolt-atom? (atoms.ss),
|
||||
;; jolt-pr-str (above), and the var-cell machinery — so loaded last.
|
||||
(load "host/chez/multimethods.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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue