unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* maphash
@ 2024-09-10 15:52 Helmut Eller
  2024-09-11 14:23 ` maphash Mattias Engdegård
  0 siblings, 1 reply; 15+ messages in thread
From: Helmut Eller @ 2024-09-10 15:52 UTC (permalink / raw)
  To: emacs-devel

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?



^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <p04310100bac9ebec6275@[198.17.100.22]>]

end of thread, other threads:[~2024-10-04  8:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-10 15:52 maphash Helmut Eller
2024-09-11 14:23 ` maphash Mattias Engdegård
2024-09-11 22:45   ` maphash Andrea Corallo
2024-09-28  8:42     ` maphash Eli Zaretskii
2024-09-30 14:29       ` maphash Andrea Corallo
2024-10-01 16:31         ` maphash Andrea Corallo
2024-10-01 16:59           ` maphash Mattias Engdegård
2024-10-01 18:36             ` maphash Andrea Corallo
2024-10-02  8:43               ` maphash Mattias Engdegård
2024-10-03 11:18                 ` maphash Andrea Corallo
2024-10-04  8:30                   ` maphash Mattias Engdegård
     [not found] <p04310100bac9ebec6275@[198.17.100.22]>
2003-04-24  1:51 ` maphash Richard Stallman
2003-04-24  7:46   ` maphash Stephen J. Turnbull
2003-04-24 21:58     ` maphash Greg Hill
2003-04-26  2:32       ` maphash Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).