refactor: rename dynamic-vars.ss, extract natives-format.ss (jolt-7dkx)
Two small clarity moves from the review: - dynamic-vars.ss -> dynamic-var-defaults.ss. It holds the default VALUES of a few core dynamic vars (*clojure-version*, *assert*, …); the near-identical dyn-binding.ss holds the binding-stack machinery. The names were easy to confuse. - Pull the ~60-line %-format engine out of the natives-misc.ss grab-bag into natives-format.ss (its ->long/pad-left/fmt-float helpers were local to it). rt.ss loads + MODULES.md updated. Runtime .ss, no re-mint; make test green, format + the dynamic vars verified.
This commit is contained in:
parent
960d8b6e24
commit
43a0da4dd0
5 changed files with 77 additions and 69 deletions
|
|
@ -1,25 +0,0 @@
|
|||
;; dynamic vars — the handful of clojure.core dynamic vars that aren't emitted into
|
||||
;; the prelude. 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 map {:major 1 :minor 11 :incremental 0 :qualifier nil}.
|
||||
(def-var! "clojure.core" "*clojure-version*"
|
||||
(jolt-hash-map (keyword #f "major") 1
|
||||
(keyword #f "minor") 11
|
||||
(keyword #f "incremental") 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)
|
||||
|
||||
;; *warn-on-reflection* — jolt has no reflection, so the var reads false; (set!
|
||||
;; *warn-on-reflection* …) resolves and updates it (a no-op effect).
|
||||
(def-var! "clojure.core" "*warn-on-reflection*" #f)
|
||||
|
||||
;; *assert* — gates `assert`; settable/bindable (malli.assert toggles it). Default
|
||||
;; true, like the JVM.
|
||||
(def-var! "clojure.core" "*assert*" #t)
|
||||
|
||||
;; *print-readably* — bound by pr-family / with-out-str-style code; default true.
|
||||
(def-var! "clojure.core" "*print-readably*" #t)
|
||||
Loading…
Add table
Add a link
Reference in a new issue