Skip to content
Snippets Groups Projects
Commit 49774478 authored by dtc's avatar dtc
Browse files

Special case the handling of hash tables within equalp. This brings

equalp in line with the CL spec. and is necessary because the new hash
implementation maintains a reference back to the hash table within the
hash vector (for the garbage collector) which could cause infinite
recursion by equalp. Based on some good spotting and a patch from
Raymond Toy.
parent d2107dfb
No related branches found
No related tags found
No related merge requests found
......@@ -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/pred.lisp,v 1.52 2000/05/02 04:44:05 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pred.lisp,v 1.53 2000/05/14 03:58:01 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -423,6 +423,21 @@
(equalp (cdr x) (cdr y))))
((pathnamep x)
(and (pathnamep y) (pathname= x y)))
((hash-table-p x)
(and (hash-table-p y)
(eql (hash-table-count x) (hash-table-count y))
(eql (hash-table-test x) (hash-table-test y))
(with-hash-table-iterator (next x)
(loop
(multiple-value-bind (more x-key x-value)
(next)
(cond (more
(multiple-value-bind (y-value foundp)
(gethash x-key y)
(unless (and foundp (equalp x-value y-value))
(return nil))))
(t
(return t))))))))
((%instancep x)
(let* ((layout-x (%instance-layout x))
(len (layout-length layout-x)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment