From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Don't use mark_vectorlike for bool vectors Date: Fri, 05 Oct 2007 13:56:04 +0400 Message-ID: <47060A34.8020803@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060700090604010402040203" X-Trace: sea.gmane.org 1191578594 18312 80.91.229.12 (5 Oct 2007 10:03:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2007 10:03:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 05 12:03:12 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Idk1W-0006rU-5o for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 12:03:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Idk1R-0008M0-Dt for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 06:03:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Idk1P-0008Ky-0A for emacs-devel@gnu.org; Fri, 05 Oct 2007 06:03:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Idk1N-0008IT-Gr for emacs-devel@gnu.org; Fri, 05 Oct 2007 06:03:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Idk1N-0008IF-8d for emacs-devel@gnu.org; Fri, 05 Oct 2007 06:03:01 -0400 Original-Received: from smtp4.yandex.ru ([213.180.223.136]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Idk1M-0002XS-Gx for emacs-devel@gnu.org; Fri, 05 Oct 2007 06:03:00 -0400 Original-Received: from rtsoft2.corbina.net ([85.21.88.2]:37798 "EHLO localhost.localdomain" smtp-auth: "dmantipov" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S738102AbXJEKCu (ORCPT ); Fri, 5 Oct 2007 14:02:50 +0400 X-Comment: RFC 2476 MSA function at smtp4.yandex.ru logged sender identity as: dmantipov User-Agent: Thunderbird 2.0.0.5 (X11/20070719) X-Detected-Kernel: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80288 Archived-At: This is a multi-part message in MIME format. --------------060700090604010402040203 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit This cleanup patch avoids using mark_vectorlike for bool vectors, since this kind of vectors doesn't contains Lisp objects to trace during GC. Dmitry --------------060700090604010402040203 Content-Type: text/x-patch; name="vector_mark.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vector_mark.patch" Index: ChangeLog =================================================================== RCS file: /sources/emacs/emacs/src/ChangeLog,v retrieving revision 1.5912 diff -u -r1.5912 ChangeLog --- ChangeLog 4 Oct 2007 16:57:53 -0000 1.5912 +++ ChangeLog 5 Oct 2007 09:58:11 -0000 @@ -1,3 +1,8 @@ +2007-10-05 Dmitry Antipov + + * alloc.c (mark_object): Don't use mark_vectorlike for bool + vectors, reorganize vector marking code. + 2007-10-04 Juanma Barranquero * image.c (syms_of_image) : Fix typo in docstring. Index: alloc.c =================================================================== RCS file: /sources/emacs/emacs/src/alloc.c,v retrieving revision 1.426 diff -u -r1.426 alloc.c --- alloc.c 2 Oct 2007 22:07:41 -0000 1.426 +++ alloc.c 5 Oct 2007 09:58:11 -0000 @@ -5553,8 +5553,6 @@ mark_buffer (obj); } } - else if (GC_SUBRP (obj)) - break; else if (GC_COMPILEDP (obj)) /* We could treat this just like a vector, but it is better to save the COMPILED_CONSTANTS element for last and avoid @@ -5619,7 +5617,11 @@ VECTOR_MARK (XVECTOR (h->key_and_value)); } } - else + else if (GC_BOOL_VECTOR_P (obj)) + /* Since no Lisp_Objects are referenced from bool vector, + just mark the vector without examining it's contents. */ + VECTOR_MARK (XVECTOR (obj)); + else if (!GC_SUBRP (obj)) mark_vectorlike (XVECTOR (obj)); break; --------------060700090604010402040203 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------060700090604010402040203--