From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: maphash Date: Tue, 10 Sep 2024 17:52:06 +0200 Message-ID: <875xr3h5g9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20126"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 10 17:52:34 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1so3AP-00057v-TK for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Sep 2024 17:52:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so3A5-0001lB-8T; Tue, 10 Sep 2024 11:52:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so3A3-0001l1-9F for emacs-devel@gnu.org; Tue, 10 Sep 2024 11:52:11 -0400 Original-Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so3A1-0001IG-QV for emacs-devel@gnu.org; Tue, 10 Sep 2024 11:52:11 -0400 Original-Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a8a897bd4f1so595834366b.3 for ; Tue, 10 Sep 2024 08:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725983528; x=1726588328; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=e7QPSyyXsiaMsmfCskXeiWGUuqWEq6K3e2n3cjvV8NU=; b=IntSjugBZJ/w5GASwuuo9GXoJMg1wKmY/OBxi1CQQu8Xs2x7JAPHinGJqhEdx2yide ZMBV5TjRimkhcWsJssZSn/+rUVlEK/I0I2Y7MGXx+Uymw+bHt9FkzZEcABjR5bgYjQgE ZlDywoNyslab7XDFHXAJE7fCncylreOaCexi3h/iqIXYJRVsIBDXa8YbMTqw4xtqA54+ pvGuD3Q1arxhSLa8R26f2o+IaIXmGnjbLWmDW3P8ktIWwwVuy9P8XgylLT1g+4CXimcb +2WyrFcQSxldo8o3brztfF6E5/a6lxp0/6PmN+XxnkTQiPphzzOSSPf3FkQlFnCLbN2P HLCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725983528; x=1726588328; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e7QPSyyXsiaMsmfCskXeiWGUuqWEq6K3e2n3cjvV8NU=; b=pNBE/w9oDL9pOlED0tpJcda6ZSVlAMKiCw+m0vvy2U+M8jNv3iI2IdZRQck1OC9Xky mTAatRGD5rPsIOWfN8v53VkGCx9KsrRtYuSTyC/OCi9ORT9XgyxOwZujjWFeI2qvDllI l8GkHLOvo3H/EGMtpNDe0zAzALPpKwve00SCUufKAaYqhGmvh5R/p3668RqH2eitxkOD ASupSFwfGL6f5GTjZh8rws5tXtpKrVWY16HTiJzm52/jyyBJxe2Tp3DIQWZgFisiifkJ F7NZZb69dDbqHzihKDOXChHEBvPNOIuFixy8YVQNa+KvgcjV6bmT3rnOzi7ycm+cQ3y1 tF1Q== X-Gm-Message-State: AOJu0Yz9YVf0Rt+GbpAGgrMQTE83vinHP0WM6IUPgZXjg83RxmoxvDEd 9EdGF30SEWszp+g7xouZ1LEwfjL6V4Tpe4MyBwQ56ytvOEDHBwoKT4JHBw== X-Google-Smtp-Source: AGHT+IHZ3IrZLB7LHq7GzxC71OWxft3KjTTToZaho9GSVqTrzlc5Vmg7RJLRTHsE8PqXSjU4Cld5OA== X-Received: by 2002:a17:906:f5a9:b0:a7d:a00a:a9fe with SMTP id a640c23a62f3a-a8ffaac09dfmr106277466b.17.1725983527441; Tue, 10 Sep 2024 08:52:07 -0700 (PDT) Original-Received: from caladan ([31.177.116.60]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25c62541sm501787066b.111.2024.09.10.08.52.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 08:52:06 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=eller.helmut@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323530 Archived-At: 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?