1.0.6.5: potential CLOS GC safety issue
[sbcl.git] / src / pcl / boot.lisp
index fbfdbe8..8d87432 100644 (file)
@@ -619,7 +619,7 @@ bootstrapping.
                     (typecase specializer-nameoid
                       (symbol (find-class specializer-nameoid nil))
                       (class specializer-nameoid)
-                      (class-eq-specializer 
+                      (class-eq-specializer
                        (specializer-class specializer-nameoid))
                       (t nil))))
              (ecase kind
@@ -638,7 +638,7 @@ bootstrapping.
                  (cond
                    (class
                     (if (typep class '(or built-in-class structure-class))
-                        `(type ,specializer ,parameter)
+                        `(type ,class ,parameter)
                         ;; don't declare CLOS classes as parameters;
                         ;; it's too expensive.
                         '(ignorable)))
@@ -1420,7 +1420,13 @@ bootstrapping.
                    (t form))))
 
       (let ((walked-lambda (walk-form method-lambda env #'walk-function)))
-        (values walked-lambda
+        ;;; FIXME: the walker's rewriting of the source code causes
+        ;;; trouble when doing code coverage. The rewrites should be
+        ;;; removed, and the same operations done using
+        ;;; compiler-macros or tranforms.
+        (values (if (sb-c:policy env (= sb-c:store-coverage-data 0))
+                    walked-lambda
+                    method-lambda)
                 call-next-method-p
                 closurep
                 next-method-p-p
@@ -2003,8 +2009,6 @@ bootstrapping.
       (setf (gf-dfun-state generic-function) new-value)))
 
 (defun set-dfun (gf &optional dfun cache info)
-  (when cache
-    (setf (cache-owner cache) gf))
   (let ((new-state (if (and dfun (or cache info))
                        (list* dfun cache info)
                        dfun)))