~ chicken-core (chicken-5) 889d1c9bbec9077eff11985621e85595f69ac868
commit 889d1c9bbec9077eff11985621e85595f69ac868
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Fri May 1 20:24:43 2015 +1200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun May 3 19:24:35 2015 +0200
Specialize memq, assq et al. of null to false
Signed-off-by: Peter Bex <peter@more-magic.net>
Conflicts:
types.db
diff --git a/types.db b/types.db
index 93413b85..8693e568 100644
--- a/types.db
+++ b/types.db
@@ -180,17 +180,20 @@
(memq (forall (a b) (#(procedure #:clean #:foldable) memq
(a (list-of b))
(or false (list-of b))))
+ ((* null) (let ((#(tmp) #(1))) '#f))
((* list) (##core#inline "C_u_i_memq" #(1) #(2))))
(memv (forall (a b) (#(procedure #:clean #:foldable) memv
(a (list-of b))
(or false (list-of b))))
+ ((* null) (let ((#(tmp) #(1))) '#f))
(((or symbol procedure immediate) list)
(##core#inline "C_u_i_memq" #(1) #(2))))
(member (forall (a b) (#(procedure #:clean #:foldable) member
(a (list-of b) #!optional (procedure (b a) *)) ; sic
(or false (list-of b))))
+ ((* null) (let ((#(tmp) #(1))) '#f))
(((or symbol procedure immediate) list)
(##core#inline "C_u_i_memq" #(1) #(2)))
((* (list-of (or symbol procedure immediate)))
@@ -199,11 +202,13 @@
(assq (forall (a b) (#(procedure #:clean #:foldable) assq
(* (list-of (pair a b)))
(or false (pair a b))))
+ ((* null) (let ((#(tmp) #(1))) '#f))
((* (list-of pair)) (##core#inline "C_u_i_assq" #(1) #(2))))
(assv (forall (a b) (#(procedure #:clean #:foldable) assv
(* (list-of (pair a b)))
(or false (pair a b))))
+ ((* null) (let ((#(tmp) #(1))) '#f))
(((or symbol immediate procedure) (list-of pair))
(##core#inline "C_u_i_assq" #(1) #(2)))
((* (list-of (pair (or symbol procedure immediate) *)))
@@ -212,6 +217,7 @@
(assoc (forall (a b c) (#(procedure #:clean #:foldable) assoc
(a (list-of (pair b c)) #!optional (procedure (b a) *)) ; sic
(or false (pair b c))))
+ ((* null) (let ((#(tmp) #(1))) '#f))
(((or symbol procedure immediate) (list-of pair))
(##core#inline "C_u_i_assq" #(1) #(2)))
((* (list-of (pair (or symbol procedure immediate) *)))
Trap