0.9.2.37:
[sbcl.git] / src / pcl / env.lisp
index d793f9a..fadcb93 100644 (file)
   (fdefinition name))
 |#
 \f
+;;;; Helper for slightly newer trace implementation, based on
+;;;; breakpoint stuff.  The above is potentially still useful, so it's
+;;;; left in, commented.
+(defun list-all-maybe-method-names (gf)
+  (let (result)
+    (dolist (method (generic-function-methods gf) (nreverse result))
+      (let ((spec (nth-value 2 (parse-method-or-spec method))))
+        (push spec result)
+        (push (list* 'fast-method (cdr spec)) result)))))
+\f
 ;;;; MAKE-LOAD-FORM
 
 ;; Overwrite the old bootstrap non-generic MAKE-LOAD-FORM function with a
                          (eq :instance (slot-definition-allocation slot))))
             (if (slot-boundp-using-class class object slot)
                 (let ((value (slot-value-using-class class object slot)))
-                  (inits `(setf (slot-value ,object ',slot-name) ',value)))
+                 (if (typep object 'structure-object)
+                     ;; low-level but less noisy initializer form
+                     (let* ((dd (get-structure-dd (class-name class)))
+                            (dsd (find slot-name (dd-slots dd)
+                                       :key #'dsd-name)))
+                       (inits `(,(slot-setter-lambda-form dd dsd)
+                                ',value ,object)))
+                     (inits `(setf (slot-value ,object ',slot-name) ',value))))
                 (inits `(slot-makunbound ,object ',slot-name))))))
       (values `(allocate-instance (find-class ',(class-name class)))
               `(progn ,@(inits))))))