projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.18.3:
[sbcl.git]
/
src
/
code
/
typecheckfuns.lisp
diff --git
a/src/code/typecheckfuns.lisp
b/src/code/typecheckfuns.lisp
index
2083c55
..
eeaeb0a
100644
(file)
--- a/
src/code/typecheckfuns.lisp
+++ b/
src/code/typecheckfuns.lisp
@@
-122,7
+122,7
@@
;;; Memoize the FORM which returns a typecheckfun for TYPESPEC.
(defmacro memoized-typecheckfun-form (form typespec)
;;; Memoize the FORM which returns a typecheckfun for TYPESPEC.
(defmacro memoized-typecheckfun-form (form typespec)
- (let ((n-typespec (gensym "TYPESPEC")))
+ (with-unique-names (n-typespec)
`(let ((,n-typespec ,typespec))
(or (gethash ,n-typespec *typecheckfuns*)
(setf (gethash ,n-typespec *typecheckfuns*)
`(let ((,n-typespec ,typespec))
(or (gethash ,n-typespec *typecheckfuns*)
(setf (gethash ,n-typespec *typecheckfuns*)
@@
-199,7
+199,11
@@
(member-type-p ctype)
(numeric-type-p ctype)
(array-type-p ctype)
(member-type-p ctype)
(numeric-type-p ctype)
(array-type-p ctype)
- (cons-type-p ctype))))
+ (cons-type-p ctype)
+ (intersection-type-p ctype)
+ (union-type-p ctype)
+ (negation-type-p ctype)
+ (character-set-type-p ctype))))
;;; Evaluate (at load/execute time) to a function which checks that
;;; its argument is of the specified type.
;;; Evaluate (at load/execute time) to a function which checks that
;;; its argument is of the specified type.
@@
-207,7
+211,7
@@
;;; The name is slightly misleading, since some cases are memoized, so
;;; we might reuse a value which was made earlier instead of creating
;;; a new one from scratch.
;;; The name is slightly misleading, since some cases are memoized, so
;;; we might reuse a value which was made earlier instead of creating
;;; a new one from scratch.
-(declaim (ftype (function (t) function) typespec-typecheckfun))
+(declaim (ftype (sfunction (t) function) typespec-typecheckfun))
(defun typespec-typecheckfun (typespec)
;; a general-purpose default case, hopefully overridden by the
;; DEFINE-COMPILER-MACRO implementation
(defun typespec-typecheckfun (typespec)
;; a general-purpose default case, hopefully overridden by the
;; DEFINE-COMPILER-MACRO implementation
@@
-221,7
+225,7
@@
(let* ((typespec (second typespec-form))
(ctype (specifier-type typespec)))
(aver (= 2 (length typespec-form)))
(let* ((typespec (second typespec-form))
(ctype (specifier-type typespec)))
(aver (= 2 (length typespec-form)))
- (cond ((structure-class-p ctype)
+ (cond ((structure-classoid-p ctype)
`(structure-object-typecheckfun ,typespec-form))
((ctype-needs-to-be-interpreted-p ctype)
whole) ; i.e. give up compiler macro
`(structure-object-typecheckfun ,typespec-form))
((ctype-needs-to-be-interpreted-p ctype)
whole) ; i.e. give up compiler macro