;;; 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*)
;;; 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
(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