From 286c8a6b125f307f3b29861719b1b6e2b4ef8c5c Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Sun, 16 Jan 2000 20:10:39 +0000 Subject: [PATCH] The equalp-hash algorithms for vectors and arrays differs because the fill-pointer must be respected for vectors but was being ignored for some vector types. --- code/hash-new.lisp | 9 ++++++--- code/hash.lisp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/code/hash-new.lisp b/code/hash-new.lisp index 32294717c..e160c50fa 100644 --- a/code/hash-new.lisp +++ b/code/hash-new.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash-new.lisp,v 1.11 2000/01/15 15:10:33 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash-new.lisp,v 1.12 2000/01/16 20:10:39 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1050,8 +1050,11 @@ (internal-equalp-hash (realpart s-expr) 0) (logxor (internal-equalp-hash (realpart s-expr) 0) (internal-equalp-hash (realpart s-expr) 0)))))) - (simple-vector (vector-equalp-hash (truly-the simple-vector s-expr) depth)) - (array (array-equalp-hash s-expr depth)) + (array + (typecase s-expr + (simple-vector (vector-equalp-hash (truly-the simple-vector s-expr) depth)) + (vector (vector-equalp-hash s-expr depth)) + (t (array-equalp-hash s-expr depth)))) ;; Everything else. (t 42))) diff --git a/code/hash.lisp b/code/hash.lisp index 566af7343..6622a6437 100644 --- a/code/hash.lisp +++ b/code/hash.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash.lisp,v 1.35 2000/01/15 15:10:33 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash.lisp,v 1.36 2000/01/16 20:10:39 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1019,8 +1019,11 @@ (internal-equalp-hash (realpart s-expr) 0) (logxor (internal-equalp-hash (realpart s-expr) 0) (internal-equalp-hash (realpart s-expr) 0)))))) - (simple-vector (vector-equalp-hash (truly-the simple-vector s-expr) depth)) - (array (array-equalp-hash s-expr depth)) + (array + (typecase s-expr + (simple-vector (vector-equalp-hash (truly-the simple-vector s-expr) depth)) + (vector (vector-equalp-hash s-expr depth)) + (t (array-equalp-hash s-expr depth)))) ;; Everything else. (t 42))) -- GitLab