From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: Merging bignum to master Date: Thu, 16 Aug 2018 00:57:10 +0100 Message-ID: <86mutngp49.fsf@gmail.com> References: <877ekwu1mn.fsf@tromey.com> <611579fd-52f2-0104-ef82-a7a4a3929700@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1534377328 26007 195.159.176.226 (15 Aug 2018 23:55:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2018 23:55:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 16 01:55:24 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fq5dM-0006fj-4U for ged-emacs-devel@m.gmane.org; Thu, 16 Aug 2018 01:55:24 +0200 Original-Received: from localhost ([::1]:52729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fq5fS-0005vs-LL for ged-emacs-devel@m.gmane.org; Wed, 15 Aug 2018 19:57:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fq5fH-0005uC-FA for emacs-devel@gnu.org; Wed, 15 Aug 2018 19:57:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fq5fD-0005HA-Bq for emacs-devel@gnu.org; Wed, 15 Aug 2018 19:57:23 -0400 Original-Received: from [195.159.176.226] (port=34938 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fq5fC-0005GL-VK for emacs-devel@gnu.org; Wed, 15 Aug 2018 19:57:19 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fq5d3-0006JR-Gs for emacs-devel@gnu.org; Thu, 16 Aug 2018 01:55:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:C+/AtbkCZCHiqgKIRzuvVxyxEVo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228575 Archived-At: On Wed 15 Aug 2018, Pip Cet wrote: > If you really think XFIXNUMFWD is a good name, don't you at least > agree that it should go with renaming other references to intfwds to > fixnumfwds? Right now we have: > > static struct Lisp_Intfwd * > XFIXNUMFWD (union Lisp_Fwd *a) > { > eassert (INTFWDP (a)); > return &a->u_intfwd; > } Please don't top-post on technical mailing lists. XFIXNUMFWD might not be pretty, but it does convey the idea that this is code that only understands fixnums (the same as pre-bignum emacs), and will need careful inspection before modifying it to support bignums. > I still think that's clearly a case of over-eager replacement (XINT -> > XFIXNUM). To have XFIXNUMFWD but INTFWDP seems obviously wrong to me. The XINT -> XFIXNUM renaming preserved the meaning from pre-bignum emacs i.e. only fixnums are supported. It would seem sensible to rename INTFWDP -> FIXNUMFWDP to keep the naming consistent, and then extend the code to support bignums later. One thing to be careful of here is that on 64bit Windows builds of emacs, sizeof (EMACS_INT) is 64bit but sizeof (long) is 32bit. This requires careful use of the GMP library API, which does not accept long long inputs (see mpz_set_intmax and mpz_set_uintmax in lisp.h). AndyM