From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Pure nil and t? Date: Mon, 22 Sep 2014 11:16:41 +0200 Message-ID: References: <541FDFF8.8060405@yandex.ru> <871tr4m40g.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411377436 4696 80.91.229.3 (22 Sep 2014 09:17:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2014 09:17:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 22 11:17:08 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVzk3-0006gc-9e for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2014 11:17:07 +0200 Original-Received: from localhost ([::1]:43989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVzk2-00037L-P6 for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2014 05:17:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVzjv-0002z6-7N for emacs-devel@gnu.org; Mon, 22 Sep 2014 05:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVzjq-0002Lt-AL for emacs-devel@gnu.org; Mon, 22 Sep 2014 05:16:59 -0400 Original-Received: from cantor2.suse.de ([195.135.220.15]:40096 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVzjk-0002Jv-9Y; Mon, 22 Sep 2014 05:16:48 -0400 Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E8D30AB1D; Mon, 22 Sep 2014 09:16:41 +0000 (UTC) X-Yow: Th' PINK SOCK... soaking... soaking... soaking... Th' PINK SOCK... washing... washing... washing... Th' PINK SOCK... rinsing... rinsing... rinsing... In-Reply-To: <871tr4m40g.fsf@fencepost.gnu.org> (David Kastrup's message of "Mon, 22 Sep 2014 10:51:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174641 Archived-At: David Kastrup writes: > Dmitry Antipov writes: > >> For a long byte-compile runs, ~15-17% of objects seen by GC are nil and t >> (especially nil, which is ~10x more "popular" than t). What about making >> them pure? Thus way they will be quickly filtered out by PURE_POINTER_P >> check in mark_object, thus offloading GC from an in-depth examination of >> them each time when they're found. > > In my Emacs I see > M-: (symbol-plist nil) RET > (event-symbol-element-mask (nil 0) event-symbol-elements (nil) modifier-cache ((0))) > M-: (symbol-plist t) RET > (event-symbol-element-mask (t 0) event-symbol-elements (t) modifier-cache ((0 . t))) > > While I consider it likely that those are the result of glitches and/or > bugs, it would be nice if those glitches did not lead to crashes by > letting these plists get collected in spite of being accessible. They probably would have to be made pure as well, and checks would have to be added to not try to modify any of the fields of a pure symbol. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."