Migrate list?/ratio?/rational? to the overlay; narrow jolt.host exposure
list?, ratio?, and rational? are the predicate-web members that are genuinely safe to migrate: not extended at runtime, not on the compiler emit/inference path, not reached by the kernel tier. They now live in the overlay (clojure/core/20-coll.clj) built on the jolt.host tower/rep tests, lowering to the same code the native shims did. Removed their native definitions (predicates.ss) and, for ratio?/rational?, the now-redundant post-prelude re-assertions. Also dropped the dead all-flonum overlay ratio?/rational?/decimal? stubs. The rest of the web stays native and is documented as such: map?/set?/ seq?/coll? are extended with sorted/record/lazy arms, decimal? is extended by the optional bigdec module, integer?/float? are on the emit/inference path, vector? is reached by the kernel-tier peek. jolt.host exposure is therefore narrowed to just the tests these three consume (exact?, rational-type?, cseq?, cseq-list?, empty-list?). Numeric probe is byte-identical to pre-migration; list? correct across list/vector/lazy/empty/cons/rest cases. Selfhost fixpoint holds, values/ unit/smoke/corpus green, bench flat within noise.
This commit is contained in:
parent
12058d2dcf
commit
bbca8bc0de
5 changed files with 43 additions and 47 deletions
|
|
@ -205,13 +205,13 @@
|
|||
(guard (e (#t #f))
|
||||
(def-var! "clojure.core" "simple-ident?" (letrec ((simple-ident? (lambda (x) (let fnrec4789 ((x x)) (let* ((or__26__auto (jolt-invoke (var-deref "clojure.core" "simple-symbol?") x))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "clojure.core" "simple-keyword?") x))))))) simple-ident?)))
|
||||
(guard (e (#t #f))
|
||||
(def-var! "clojure.core" "ratio?" (letrec ((ratio? (lambda (x) (let fnrec4790 ((x x)) #f)))) ratio?)))
|
||||
(def-var! "clojure.core" "ratio?" (letrec ((ratio? (lambda (x) (let fnrec4790 ((x x)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "number?") x))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "exact?") x))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "rational-type?") x))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-invoke (var-deref "clojure.core" "integer?") x)) and__25__auto)) and__25__auto)) and__25__auto)))))) ratio?)))
|
||||
(guard (e (#t #f))
|
||||
(def-var! "clojure.core" "decimal?" (letrec ((decimal? (lambda (x) (let fnrec4791 ((x x)) #f)))) decimal?)))
|
||||
(def-var! "clojure.core" "rational?" (letrec ((rational? (lambda (x) (let fnrec4791 ((x x)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "number?") x))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "exact?") x) and__25__auto)))))) rational?)))
|
||||
(guard (e (#t #f))
|
||||
(def-var! "clojure.core" "class?" (letrec ((class? (lambda (x) (let fnrec4792 ((x x)) #f)))) class?)))
|
||||
(guard (e (#t #f))
|
||||
(def-var! "clojure.core" "rational?" (letrec ((rational? (lambda (x) (let fnrec4793 ((x x)) (jolt-invoke (var-deref "clojure.core" "int?") x))))) rational?)))
|
||||
(def-var! "clojure.core" "list?" (letrec ((list? (lambda (x) (let fnrec4793 ((x x)) (let* ((or__26__auto (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "cseq?") x))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "cseq-list?") x) and__25__auto)))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "jolt.host" "empty-list?") x))))))) list?)))
|
||||
(guard (e (#t #f))
|
||||
(def-var! "clojure.core" "nat-int?" (letrec ((nat-int? (lambda (x) (let fnrec4794 ((x x)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "int?") x))) (if (jolt-truthy? and__25__auto) (>= x 0) and__25__auto)))))) nat-int?)))
|
||||
(guard (e (#t #f))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue