From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Thu, 04 Jul 2024 15:33:40 +0000 Message-ID: References: <1VNw6cPSIpKfxNRqQBpVleX2BDbQuUqwLQzo-C8N-_PRvNNLG3BnhbcWpUJkiJYnOogBvqRTcLApebjqdZel7CgXVx9T0CnPn6_go_AugDA=@protonmail.com> <-plQctKgNkvp-LJ9ov2QAiXQKxd9V-hI0yz_opRGxQtbknubCjH4rH2-ymgbw_Qr1ZhB1rtlmiEW8XtuIVNr7nR_Yj20AH6WkH6kUGp68g0=@protonmail.com> <87msmx41x0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , Emacs Devel To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 17:58:57 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 1sPOrI-00091V-H3 for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 17:58:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPOp2-0001nl-5T; Thu, 04 Jul 2024 11:56:36 -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 1sPOSy-0008HW-JY for emacs-devel@gnu.org; Thu, 04 Jul 2024 11:33:48 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPOSx-0005P9-1g for emacs-devel@gnu.org; Thu, 04 Jul 2024 11:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720107224; x=1720366424; bh=nMo5PaiZ2zJvL8mhLCSDAQ0UWZ/YVZjK1AOto/mKfkw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ZbEdgruXS6qEMjha9KNkYfHfHwBnvdZwfRqTmsX3Wh+sK31qtEvobhOFsQMFBYI5s INLTxfAVM6CS17e7UXdQ3bIA2KLnA7tBYhk7yUKXD+PUK2kWcjcsPyjneM07DL1ZcP 7775zACTJmiDMcfTRO0MJnpPrVRGvz2obSlIdt5+IFLMF3jKEpBQorykkHncK9t15X ZZrplJXWKcTIiuGU0x8q3Q84DhNF7KZJWjvHPgWfBmIg/n2eewuRnoYlLNgplUHZ9L uVE7A2BpG+C7o8Ab1zWcqO7nYnVXNGHBTvlsOFncjk4oNB/wt/v3oTjRE0RWCxuBty M1lpc9qrlnuvw== In-Reply-To: <87msmx41x0.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 390f62f0c3130b357bca0cc56f12ab5433af1deb Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 04 Jul 2024 11:56:27 -0400 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:321335 Archived-At: On Thursday, July 4th, 2024 at 15:22, Helmut Eller = wrote: > On Wed, Jul 03 2024, Pip Cet wrote: >=20 > > And of course the same needs to be done for the marker vector, right? >=20 >=20 > It also needs to be done for the headers, right? I mean, the last > significant bits of the igc_header must be non-zero. Indeed (and IGC_OBJ_WEAK_HASH_TABLE_STRONG_PART is 32, oh no!) I just propo= sed turning the igc_header into a plain integer (rather than a bitfield) in= terpreted by igc code so I could put a tagged pointer there, but we'd also = handle that. That would also make it easier to add igc_headers to all objec= ts: we'd simply put an igc header into the structs or into pure space and f= ill it when we register the object. I'm still not sure what happens when a weak object single access is emulate= d and finds an aligned non-reference. I was hoping for a crash, but I tried= with gdb and it appears to silently be ignored. I'm also not sure whether the strong->weak and weak->strong references need= to be base pointers rather than client pointers. The documentation is some= what unclear. Thanks! Pip