From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: bug#32405: Turning misc objects into pseudovectors Date: Tue, 14 Aug 2018 12:11:15 -0700 Organization: UCLA Computer Science Department Message-ID: References: <988905f1-fb41-9559-300d-d015bda4b791@cs.ucla.edu> <8736vn8pso.fsf@tromey.com> <83o9ebo0or.fsf@gnu.org> <87o9ea5od7.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B5B81B7A4BE1059EF3A4C7AE" X-Trace: blaine.gmane.org 1534273816 28960 195.159.176.226 (14 Aug 2018 19:10:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Aug 2018 19:10:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cc: 32405-done@debbugs.gnu.org, Emacs-devel@gnu.org To: Tom Tromey , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 14 21:10:12 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1fpehl-0007Pz-HP for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Aug 2018 21:10:09 +0200 Original-Received: from localhost ([::1]:45932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpejs-0007JN-3t for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Aug 2018 15:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpeje-0007Gp-LM for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2018 15:12:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpejb-0004W3-8P for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2018 15:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fpeja-0004V8-OP for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2018 15:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fpejZ-0005V5-Px for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2018 15:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Aug 2018 19:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32405 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 32405-done@debbugs.gnu.org id=D32405.153427389121091 (code D ref 32405); Tue, 14 Aug 2018 19:12:01 +0000 Original-Received: (at 32405-done) by debbugs.gnu.org; 14 Aug 2018 19:11:31 +0000 Original-Received: from localhost ([127.0.0.1]:51065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpej4-0005U6-Bs for submit@debbugs.gnu.org; Tue, 14 Aug 2018 15:11:30 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpej1-0005Tp-0U for 32405-done@debbugs.gnu.org; Tue, 14 Aug 2018 15:11:28 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C2278160E47; Tue, 14 Aug 2018 12:11:20 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jEhPt-Afxlh0; Tue, 14 Aug 2018 12:11:19 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8B384160E71; Tue, 14 Aug 2018 12:11:19 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PW_d_xudfFWX; Tue, 14 Aug 2018 12:11:19 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A4308160E47; Tue, 14 Aug 2018 12:11:18 -0700 (PDT) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149500 gmane.emacs.devel:228535 Archived-At: This is a multi-part message in MIME format. --------------B5B81B7A4BE1059EF3A4C7AE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 08/11/2018 06:53 PM, Paul Eggert wrote: > I rebased the Bug#32405 patches to turn misc objects (including > bignums) into pseudovectors and installed them into master. I discovered a few more traces of the old misc objects, and removed them by installing the attached. --------------B5B81B7A4BE1059EF3A4C7AE Content-Type: text/x-patch; name="0001-Remove-more-traces-of-misc-Bug-32405.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Remove-more-traces-of-misc-Bug-32405.patch" >From 27a161e4060084ea093773be0716c10534847168 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 14 Aug 2018 12:07:09 -0700 Subject: [PATCH] Remove more traces of misc (Bug#32405) Remove misc-objects-consed and the misc component of memory-use-count, since misc objects no longer exist. * doc/lispref/internals.texi, etc/NEWS: Mention this, and adjust better to recent removal of misc objects. * src/alloc.c (MEM_TYPE_MISC): Remove; no longer used. (Fmemory_use_counts): Omit misc count, since miscs no longer exist. (misc-objects-consed): Remove. --- doc/lispref/internals.texi | 25 ++++++++----------------- etc/NEWS | 8 +++++--- src/alloc.c | 10 +--------- 3 files changed, 14 insertions(+), 29 deletions(-) diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index c72dbb5079..3fe28446ea 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -246,8 +246,8 @@ Garbage Collection @cindex vector-like objects, storage @cindex storage of vector-like Lisp objects - Beyond the basic vector, a lot of objects like window, buffer, and -frame are managed as if they were vectors. The corresponding C data + Beyond the basic vector, a lot of objects like markers, overlays and +buffers are managed as if they were vectors. The corresponding C data structures include the @code{union vectorlike_header} field whose @code{size} member contains the subtype enumerated by @code{enum pvec_type} and an information about how many @code{Lisp_Object} fields this structure @@ -579,6 +579,8 @@ Memory Usage @defvar vector-cells-consed The total number of vector cells that have been allocated so far in this Emacs session. +This includes vector-like objects such as markers and overlays, plus +certain objects not visible to users. @end defvar @defvar symbols-consed @@ -591,12 +593,6 @@ Memory Usage in this session. @end defvar -@defvar misc-objects-consed -The total number of miscellaneous objects that have been allocated so -far in this session. These include markers and overlays, plus -certain objects not visible to users. -@end defvar - @defvar intervals-consed The total number of intervals that have been allocated so far in this Emacs session. @@ -987,7 +983,7 @@ Object Internals In C, the tagged pointer is an object of type @code{Lisp_Object}. Any initialized variable of such a type always holds the value of one of the following basic data types: integer, symbol, string, cons cell, float, -vectorlike or miscellaneous object. Each of these data types has the +or vectorlike object. Each of these data types has the corresponding tag value. All tags are enumerated by @code{enum Lisp_Type} and placed into a 3-bit bitfield of the @code{Lisp_Object}. The rest of the bits is the value itself. Integers are immediate, i.e., directly @@ -1019,18 +1015,13 @@ Object Internals @item struct Lisp_Float Floating-point value. - -@item union Lisp_Misc -Miscellaneous kinds of objects which don't fit into any of the above. @end table These types are the first-class citizens of an internal type system. -Since the tag space is limited, all other types are the subtypes of either -@code{Lisp_Vectorlike} or @code{Lisp_Misc}. Vector subtypes are enumerated +Since the tag space is limited, all other types are the subtypes of +@code{Lisp_Vectorlike}. Vector subtypes are enumerated by @code{enum pvec_type}, and nearly all complex objects like windows, buffers, -frames, and processes fall into this category. The rest of special types, -including markers and overlays, are enumerated by @code{enum Lisp_Misc_Type} -and form the set of subtypes of @code{Lisp_Misc}. +frames, and processes fall into this category. Below there is a description of a few subtypes of @code{Lisp_Vectorlike}. Buffer object represents the text to display and edit. Window is the part diff --git a/etc/NEWS b/etc/NEWS index e381a546a9..f1d09a2b63 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -831,9 +831,11 @@ is backwards-compatible with versions of Emacs in which the old function exists. See the node "Displaying Buffers in Side Windows" in the ELisp manual for more details. -** The 'garbage-collect' function no longer returns a 'misc' component -because garbage collection no longer treats miscellaneous objects -specially; they are now allocated like any other pseudovector. +** garbage collection no longer treats miscellaneous objects specially; +they are now allocated like any other pseudovector. As a result, the +'garbage-collect' and 'memory-use-count' functions no longer return a +'misc' component, and the 'misc-objects-consed' variable has been +removed. * Lisp Changes in Emacs 27.1 diff --git a/src/alloc.c b/src/alloc.c index fb8a8c98b0..6a93821159 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -379,7 +379,6 @@ enum mem_type MEM_TYPE_BUFFER, MEM_TYPE_CONS, MEM_TYPE_STRING, - MEM_TYPE_MISC, MEM_TYPE_SYMBOL, MEM_TYPE_FLOAT, /* Since all non-bool pseudovectors are small enough to be @@ -7023,11 +7022,10 @@ Each of these counters increments for a certain kind of object. The counters wrap around from the largest positive integer to zero. Garbage collection does not decrease them. The elements of the value are as follows: - (CONSES FLOATS VECTOR-CELLS SYMBOLS STRING-CHARS MISCS INTERVALS STRINGS) + (CONSES FLOATS VECTOR-CELLS SYMBOLS STRING-CHARS INTERVALS STRINGS) All are in units of 1 = one object consed except for VECTOR-CELLS and STRING-CHARS, which count the total length of objects consed. -MISCS include overlays, markers, and some internal types. Frames, windows, buffers, and subprocesses count as vectors (but the contents of a buffer's text do not count here). */) (void) @@ -7038,7 +7036,6 @@ Frames, windows, buffers, and subprocesses count as vectors bounded_number (vector_cells_consed), bounded_number (symbols_consed), bounded_number (string_chars_consed), - bounded_number (misc_objects_consed), bounded_number (intervals_consed), bounded_number (strings_consed)); } @@ -7297,11 +7294,6 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */); DEFVAR_INT ("string-chars-consed", string_chars_consed, doc: /* Number of string characters that have been consed so far. */); - DEFVAR_INT ("misc-objects-consed", misc_objects_consed, - doc: /* Number of miscellaneous objects that have been consed so far. -These include markers and overlays, plus certain objects not visible -to users. */); - DEFVAR_INT ("intervals-consed", intervals_consed, doc: /* Number of intervals that have been consed so far. */); -- 2.17.1 --------------B5B81B7A4BE1059EF3A4C7AE--