- (ctype (specifier-type typespec)))
- (aver (= 2 (length typespec-form)))
- (cond ((structure-class-p ctype)
- `(structure-object-typecheckfun ,typespec-form))
- ((ctype-needs-to-be-interpreted-p ctype)
- whole) ; i.e. give up compiler macro
- (t
- `(let ((typespec ,typespec-form))
- (general-typecheckfun
- typespec
- ;; Unless we know that the function is already in the
- ;; memoization cache
- ,@(unless (ctype-is-common-typecheckfun-type-p ctype)
- ;; Note that we're arranging for the
- ;; UNMEMOIZED-TYPECHECKFUN argument value to be
- ;; constructed at compile time. This means the
- ;; compiler does the work of compiling the function,
- ;; and the loader does the work of loading the
- ;; function, regardless of whether the runtime check
- ;; for "is it in the memoization cache?" succeeds.
- ;; (Then if the memoization check succeeds, the
- ;; compiled and loaded function is eventually GCed.)
- ;; The wasted motion in the case of a successful
- ;; memoization check is unfortunate, but it avoids
- ;; having to invoke the compiler at load time when
- ;; memoization fails, which is probably more
- ;; important.
- `((lambda (arg)
- (unless (typep arg typespec)
- (typecheck-failure arg typespec))))))))))
+ (ctype (specifier-type typespec)))
+ (aver (= 2 (length typespec-form)))
+ (cond ((structure-classoid-p ctype)
+ `(structure-object-typecheckfun ,typespec-form))
+ ((ctype-needs-to-be-interpreted-p ctype)
+ whole) ; i.e. give up compiler macro
+ (t
+ `(let ((typespec ,typespec-form))
+ (general-typecheckfun
+ typespec
+ ;; Unless we know that the function is already in the
+ ;; memoization cache
+ ,@(unless (ctype-is-common-typecheckfun-type-p ctype)
+ ;; Note that we're arranging for the
+ ;; UNMEMOIZED-TYPECHECKFUN argument value to be
+ ;; constructed at compile time. This means the
+ ;; compiler does the work of compiling the function,
+ ;; and the loader does the work of loading the
+ ;; function, regardless of whether the runtime check
+ ;; for "is it in the memoization cache?" succeeds.
+ ;; (Then if the memoization check succeeds, the
+ ;; compiled and loaded function is eventually GCed.)
+ ;; The wasted motion in the case of a successful
+ ;; memoization check is unfortunate, but it avoids
+ ;; having to invoke the compiler at load time when
+ ;; memoization fails, which is probably more
+ ;; important.
+ `((lambda (arg)
+ (unless (typep arg typespec)
+ (typecheck-failure arg typespec))))))))))