From f4a7d6c4a2a4f846ad353dddb922dd8967f998e5 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Mon, 3 Jun 2002 18:23:56 +0000 Subject: [PATCH] 0.7.4.13: closed bug 68: "working as designed" (since CSR points out that the existence of CHANGE-CLASS makes it unsafe for SXHASH to hash STANDARD-OBJECTs based on class names, and there's no other obvious way for SXHASH to generate nontrivial hash values for STANDARD-OBJECTs) closed bug 71, since it hasn't existed for some time (DECLAIM OPTIMIZE SPEED works now.) --- BUGS | 20 +++++--------------- src/code/target-sxhash.lisp | 7 +++++++ version.lisp-expr | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/BUGS b/BUGS index f4785b5b8..a498227c2 100644 --- a/BUGS +++ b/BUGS @@ -458,14 +458,6 @@ WORKAROUND: crashes SBCL. In general tracing anything which is used in the implementation of TRACE is likely to have the same problem. -68: - As reported by Daniel Solaz on cmucl-help@cons.org 2000-11-23, - SXHASH returns the same value for all non-STRUCTURE-OBJECT instances, - notably including all PCL instances. There's a limit to how much - SXHASH can do to return unique values for instances, but at least - it should probably look at the class name, the way that it does - for STRUCTURE-OBJECTs. - 70: (probably related to bug #65; maybe related to bug #109) The compiler doesn't like &OPTIONAL arguments in LABELS and FLET @@ -487,12 +479,6 @@ WORKAROUND: (SB-C::LAMBDA-TAIL-SET (SB-C::LAMBDA-HOME SB-C::CALLEE))) failed. -71: - (DECLAIM (OPTIMIZE ..)) doesn't work. E.g. even after - (DECLAIM (OPTIMIZE (SPEED 3))), things are still optimized with - the previous SPEED policy. This bug will probably get fixed in - 0.6.9.x in a general cleanup of optimization policy. - 72: (DECLAIM (OPTIMIZE ..)) doesn't work properly inside LOCALLY forms. @@ -1279,7 +1265,11 @@ WORKAROUND: (change-class (make-instance 'foo :a 1) 'bar :b 2) should return an instance of class BAR with its A slot-value being 1 and its B slot-value being 2; at present (sbcl-0.7.4.8), it signals - an error. + an error. There's some code by Espen S. Johnsen at + + to patch around this (and some related things? not sure -- WHN) which + might be usable to fix it in the main SBCL CVS. + DEFUNCT CATEGORIES OF BUGS IR1-#: diff --git a/src/code/target-sxhash.lisp b/src/code/target-sxhash.lisp index 7dfcd3eff..5fb976226 100644 --- a/src/code/target-sxhash.lisp +++ b/src/code/target-sxhash.lisp @@ -145,6 +145,13 @@ (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 diff --git a/version.lisp-expr b/version.lisp-expr index 236027677..2ec7d5b31 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; for internal versions, especially for internal versions off the ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.4.12" +"0.7.4.13" -- 2.11.4.GIT