From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master cd06d17: Fix bug with face-id after restoring from pdump Date: Mon, 28 Jan 2019 11:37:07 -0800 Message-ID: <0399e0969432494f47589251b26178da.squirrel@dancol.org> References: <20190128152540.6870.46132@vcs0.savannah.gnu.org> <20190128152541.12A4D20B50@vcs0.savannah.gnu.org> <83womo3b13.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="111669"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: SquirrelMail/1.4.23 [SVN] Cc: Daniel Colascione , emacs-devel@gnu.org To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 28 20:38:28 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goCje-000Smk-BU for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 20:38:23 +0100 Original-Received: from localhost ([127.0.0.1]:37659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goCjd-0008J0-Cd for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 14:38:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goCid-0008H5-Vb for emacs-devel@gnu.org; Mon, 28 Jan 2019 14:37:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goCid-0001m6-6L for emacs-devel@gnu.org; Mon, 28 Jan 2019 14:37:19 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:57980) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goCiW-0001ea-MP; Mon, 28 Jan 2019 14:37:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=7Oorj47Iof4B254VOQaqhAuCzcr6H85HQB1DhaNM2Hs=; b=eSfHDzcTAQjuZtqJcK6rINu66WNfjkqvttHZnltchJ6SAGKy+BcyWfc8CWDG112g2j6xtftHvrLTB1rYSJeQmz6sCSF11x2SzNbJhFQzAf/8EtU/6K5sF/yy1yvUHAWEjhYLq1ul2exScMMEDeHTcOkRS9qfkyYr50PKCB3Y6DWIm8nOGBxOAMTP1INTQ/lcGrTGZCOAviCDUZHklUf8IgtcSiTdH88mDBwFrr8tL8PHswoPAoH037jVa5gJZAlCbBTn7m825AxTaxvemJi3s2gcN6l/qACEUI587ShELGid1gT19mQGkjjRpPbXdGV9Xyisk5FEDzTBELNer2U8pw==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goCiR-0007aL-DB; Mon, 28 Jan 2019 11:37:07 -0800 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Mon, 28 Jan 2019 11:37:07 -0800 In-Reply-To: <83womo3b13.fsf@gnu.org> X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:232774 Archived-At: >> From: Daniel Colascione >> Date: Mon, 28 Jan 2019 08:05:13 -0800 >> >> On 1/28/19 7:25 AM, Eli Zaretskii wrote: >> > branch: master >> > commit cd06d173a602bf0aa8a227ff1626dc70013fe480 >> > Author: Eli Zaretskii >> > Commit: Eli Zaretskii >> > >> > Fix bug with face-id after restoring from pdump >> >> I was going to fix this problem by just turning lface_id_to_name into a >> normal Lisp vector and using its size as the next face ID. Why use this >> more complicated approach? > > Based on previous discussion regarding frames and faces, I was under > the impression that you prefer moving stuff to the startup of emacs. > I'm not wed to my solution, feel free to change if you think it's > better. The default approach to pretty much anything should be to use the first entry in this implementation strategy that will work for a particular problem. 1) Write it in Lisp 2) Write it in C using Lisp data structures 3) Use custom data structures in C, but allocated from the Lisp heap 4) malloc some random stuff for a pure-C approach Right now, the face stuff is #3, but I think we could move it to #2 using the approach in my previous message (just using an ordinary staticprod Lisp_Object instead of a Lisp_Object* with a size field). Approaches #3 and #4 need special code for pdumper to work, but #1 and #2 Just Work, and to the greatest extent possible, we should use #1 or #2 for new feature work too. It'll reduce the total amount of code we need.