0.7.6.17:
[sbcl.git] / src / code / target-sxhash.lisp
index c77b257..5fb9762 100644 (file)
@@ -99,7 +99,7 @@
 ;;;         (unless (string= (gethash hash ht) string)
 ;;;           (format t "collision: ~S ~S~%" string (gethash hash ht)))
 ;;;         (setf (gethash hash ht) string))))
-;;;     (format t "final count=~D~%" (hash-table-count ht)))
+;;;     (format t "final count=~W~%" (hash-table-count ht)))
 
 (defun %sxhash-simple-string (x)
   (declare (optimize speed))
                    (logxor 422371266
                            (sxhash ; through DEFTRANSFORM
                             (class-name (layout-class (%instance-layout x)))))
+                   ;; Nice though it might be to return a nontrivial
+                   ;; hash value for other instances (especially
+                   ;; STANDARD-OBJECTs) there seems to be no good way
+                   ;; to do so. We can't even do the CLASS-NAME trick
+                   ;; (as used above for STRUCTURE-OBJECT) because
+                   ;; then CHANGE-CLASS would cause SXHASH values to
+                   ;; change, ouch! -- WHN recording wisdom of CSR
                    309518995))
               (symbol (sxhash x)) ; through DEFTRANSFORM
               (array