[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with looping in GETHASH-EQUAL



This problem was introduced when the kludge was added to make
REMHASH-EQUAL store -1's in the previously used slots of
EQUAL-HASH-TABLES.  What was happening was that the entire hash table
was filling with -1s, and GETHASH-EQUAL was looping looking for a slot
with NIL.

I (and RG) fixed the problem thus:  We made REMHASH-EQUAL smart about
-1s, and now it will store a NIL if possible.  Also, it will change
any other -1s to NILs directly below it.  Note that in a worst-case (but
extremely unlikely) scenario, the hash table could still fill up with
-1s, so GETHASH-EQUAL now punts if it has searched through the whole table.
PUT/SWAPHASH-EQUAL don't have that problem.

Anyone with better solutions is welcome to implement them.