[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maphash
From: |
Helmut Eller |
Subject: |
maphash |
Date: |
Tue, 10 Sep 2024 17:52:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
The documentation states that puthash and remhash are only "allowed" to
use the current key while a maphash is in progress. (Interestingly, it
says nothing about gethash.)
However, the code in comp.el uses puthash with other keys. E.g
comp--add-cond-cstrs-simple iterates over a hashtable of basic blocks
and while the iteration is in progress, it calls
comp--add-cond-cstrs-target-block which puts new basic blocks into the
hashtable.
(With the current implementation, inserting may rehash the table which
can cause maphash to "skip" some entries or visit some entries twice.)
Should the hashtable implementation detect such situations and perhaps
signal an error or a warning?