Chez Phase 2 (inc T): class native + bare class-token resolution (jolt-13zk)
Bare class names (String, Keyword, File...) evaluate to their JVM canonical-name string, the same value (class x) returns, so (= String (class "x")) holds and (defmethod m String ...) keys match a (class ...) dispatch. New host/chez/host-class.ss ports eval_resolve.janet's class-canonical-names + core_refs.janet's core-class (scalar arms; collections/seqs are host-taxonomy-dependent and not class- compared in the corpus). The analyzer already resolves these names to clojure.core vars (the seed ctx interns them via setup-class-ctors), so the back end emits (var-deref "clojure.core" "String") and a runtime def-var! is all that's needed -- no analyzer change, Janet path untouched. The class native MUST land together with token resolution: alone it turns the bare-token corpus cases (562/564) into divergences (this bit last session). Parity 2154 -> 2163 (cases 560/562/563/564/2500-2503), 0 new divergences. New test/chez/_class.janet 19/19.
This commit is contained in:
parent
b7864100cb
commit
3319684a38
5 changed files with 124 additions and 1 deletions
|
|
@ -244,8 +244,12 @@
|
|||
# validator slots; swap!/reset! validate-then-set-then-notify in seed order;
|
||||
# add-watch/remove-watch/set-validator!/get-validator are native and re-asserted
|
||||
# in post-prelude.ss over the overlay's ref-put!-on-a-Janet-table versions) 2154.
|
||||
# jolt-13zk (bare class tokens String/Keyword/File... -> canonical JVM class-name
|
||||
# strings + (class x) scalar arms, host-class.ss; the analyzer already resolves
|
||||
# these names to clojure.core vars so it's a runtime def-var! only, no analyzer
|
||||
# change) 2163.
|
||||
# Strided runs scale down.
|
||||
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2154")))
|
||||
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2163")))
|
||||
(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