X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-sxhash.lisp;h=5e7b3d9d68aea2c0b1009f7431c2d8ad374c45b1;hb=43c1fa847c7a392e145f7d39b5e1ef2cef83e78c;hp=347fc5cc4718cac55202e8e6c1d1bafe7f58fcc9;hpb=42b8c7570a2faa21529fadeef84a0caea186aa8c;p=sbcl.git diff --git a/src/code/target-sxhash.lisp b/src/code/target-sxhash.lisp index 347fc5c..5e7b3d9 100644 --- a/src/code/target-sxhash.lisp +++ b/src/code/target-sxhash.lisp @@ -145,14 +145,7 @@ (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)) + (sxhash-instance x))) (symbol (sxhash x)) ; through DEFTRANSFORM (array (typecase x @@ -169,6 +162,7 @@ (sxhash (char-code x)))) ; through DEFTRANSFORM ;; general, inefficient case of NUMBER (number (sxhash-number x)) + (generic-function (sxhash-instance x)) (t 42)))) (sxhash-recurse x)))