From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 3ed79cd: Separate bytecode stack Date: Sun, 13 Mar 2022 20:50:22 +0200 Message-ID: <83h781lma9.fsf@gnu.org> References: <83lexdlpjy.fsf@gnu.org> <447E1D53-FA02-4776-9730-507BCA1993FA@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33608"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 13 19:51:46 2022 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 1nTTJi-0008Y3-6N for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Mar 2022 19:51:46 +0100 Original-Received: from localhost ([::1]:43774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTTJg-0004cV-Pm for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Mar 2022 14:51:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTTId-0003pZ-6X for emacs-devel@gnu.org; Sun, 13 Mar 2022 14:50:39 -0400 Original-Received: from [2001:470:142:3::e] (port=60110 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTTIc-0006m5-RL; Sun, 13 Mar 2022 14:50:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jOlHqzYk/QEJ6l2gnHOrkyE7XqrQzbpxfZSJiD48bCc=; b=DepuSaOCfHDfnHoUnotj FDZ5gS7h3VmNyidAeELOcgOf73thn4QiVSELu+o4Cydt3mWrbCdVSfCFJiY81FajMqJb/OMVTRQ7X Au4HlTF2LHY2YTcVoGG08YwWNoNe4phrE7KBMnIk70o1SIr6tIZu01MluRkK3BQKbFFeozqBO5xzF Mcs+NSBi9roJqenvHfnl7hbDcBtwW865Hmku17vajwq21+ToPrAFLXpAPFskn3Wx6kgEJSqwRoz4I dFjcqbdQ7AEBfhXX6S/m0uW9AwscRQzI6S7wC4Nf/CAmw9G726t74qGZZ9y/4udGgWxR0Qyua5JGk LFnLmY0h60D9iA==; Original-Received: from [87.69.77.57] (port=1900 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTTIb-0007gf-GI; Sun, 13 Mar 2022 14:50:38 -0400 In-Reply-To: <447E1D53-FA02-4776-9730-507BCA1993FA@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sun, 13 Mar 2022 19:44:22 +0100) 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" Xref: news.gmane.io gmane.emacs.devel:287083 Archived-At: > From: Mattias EngdegÄrd > Date: Sun, 13 Mar 2022 19:44:22 +0100 > Cc: Emacs-Devel > > 13 mars 2022 kl. 18.39 skrev Eli Zaretskii : > > > > This changeset causes compilation warning in a 32-bit build in which > > !LISP_WORDS_ARE_POINTERS and which was configured --with-wide-int: > > > > In file included from bytecode.c:22: > > bytecode.c: In function 'sf_set_ptr': > > bytecode.c:396:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > > 396 | fp[index] = XIL ((EMACS_INT)value); > > Thank you for testing this configuration! Silly mistake of mine; please try with the pushed change. The warning is gone, but I cannot say I'm happy with the code, see below. > > More generally, I'm quite nervous to see void * pointers and integers > > being put into the same array. > > Actually what we are doing is storing arbitrary pointers in a Lisp_Object, and this should always be possible. I don't think I understand why you need to do this in the first place. XLP was introduced for very specific and very rare situations, and I don't see why we would need in this case to use something similar. What am I missing? What kind of pointers do you need to store in the fp array, why, and for what purpose? And if you do need to do that, why not use a union?