Reduce consing during SUBTYPEP on classes.
authorStas Boukarev <stassats@gmail.com>
Sat, 26 Oct 2013 14:42:22 +0000 (18:42 +0400)
committerStas Boukarev <stassats@gmail.com>
Sat, 26 Oct 2013 14:42:22 +0000 (18:42 +0400)
sb-pcl::class-has-a-forward-referenced-superclass-p, used in the
implementation of subtypep on classes, conses because SOME can't
perform the required inlining when used on the sequences of unknown
type. (See lp#1070635)

src/pcl/std-class.lisp

index 975acc4..37e3c75 100644 (file)
   (or (when (forward-referenced-class-p class)
         class)
       (some #'class-has-a-forward-referenced-superclass-p
-            (class-direct-superclasses class))))
+            ;; KLUDGE: SOME conses without knowing the type
+            (the list (class-direct-superclasses class)))))
 
 ;;; This is called by :after shared-initialize whenever a class is initialized
 ;;; or reinitialized. The class may or may not be finalized.