From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.lisp.guile.devel Subject: minor SCM_DEBUG patch Date: Thu, 29 Oct 2009 13:51:26 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256838723 27762 80.91.229.12 (29 Oct 2009 17:52:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2009 17:52:03 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 29 18:51:56 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N3ZAB-0007UK-B7 for guile-devel@m.gmane.org; Thu, 29 Oct 2009 18:51:55 +0100 Original-Received: from localhost ([127.0.0.1]:58696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3ZAA-0001cN-H9 for guile-devel@m.gmane.org; Thu, 29 Oct 2009 13:51:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3ZA3-0001c7-GZ for guile-devel@gnu.org; Thu, 29 Oct 2009 13:51:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3Z9y-0001bP-Nl for guile-devel@gnu.org; Thu, 29 Oct 2009 13:51:46 -0400 Original-Received: from [199.232.76.173] (port=46154 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3Z9y-0001bM-ID for guile-devel@gnu.org; Thu, 29 Oct 2009 13:51:42 -0400 Original-Received: from splat.raeburn.org ([69.25.196.39]:50267 helo=raeburn.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N3Z9n-0007vk-4L for guile-devel@gnu.org; Thu, 29 Oct 2009 13:51:42 -0400 Original-Received: from [10.0.0.158] ([10.0.0.158]) by raeburn.org (8.14.3/8.14.1) with ESMTP id n9THpQDY023320; Thu, 29 Oct 2009 13:51:26 -0400 (EDT) X-Mailer: Apple Mail (2.936) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9602 Archived-At: The SCM_GC_MARK_P macro doesn't exist any more, but is still mentioned in a few places. With SCM_DEBUG defined, one of them actually gets compiled. While looking at this, I also noticed three macros in deprecated.h (which were there in 1.8) which use non-existent macros including SCM_GC_MARK_P, and deleted those too. I didn't touch the other uses of SCM_GC_MARK_P in futures.c. With this, and my pair-checking patches for objects.c and eval.i.c (sent September 5, still awaiting review from a developer familiar enough with the code), I can build a version with SCM_DEBUG that passes tests. Related but not addressed here: Several places still check scm_gc_running_p and conditionally execute code (or not), but it's now defined as a macro always expanding to 0. Clean up some uses of old GC macros that don't exist any more. * libguile/deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK): Delete. * libguile/gc.c (scm_assert_cell_valid): Remove check of SCM_GC_MARK_P. diff --git a/libguile/deprecated.h b/libguile/deprecated.h index ed1a105..5680d09 100644 --- a/libguile/deprecated.h +++ b/libguile/deprecated.h @@ -120,9 +120,6 @@ SCM_DEPRECATED SCM scm_unprotect_object (SCM obj); (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y)))) #define SCM_FREEP(x) (0) #define SCM_NFREEP(x) (1) -#define SCM_GC8MARKP(x) SCM_GC_MARK_P (x) -#define SCM_SETGC8MARK(x) SCM_SET_GC_MARK (x) -#define SCM_CLRGC8MARK(x) SCM_CLEAR_GC_MARK (x) #define SCM_GCTYP16(x) SCM_TYP16 (x) #define SCM_GCCDR(x) SCM_CDR (x) SCM_DEPRECATED void scm_remember (SCM * ptr); diff --git a/libguile/gc.c b/libguile/gc.c index 9c56d04..96e3c30 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -146,18 +146,7 @@ scm_assert_cell_valid (SCM cell) */ if (scm_expensive_debug_cell_accesses_p) scm_i_expensive_validation_check (cell); -#if (SCM_DEBUG_MARKING_API == 0) - if (!SCM_GC_MARK_P (cell)) - { - fprintf (stderr, - "scm_assert_cell_valid: this object is unmarked. \n" - "It has been garbage-collected in the last GC run: " - "%lux\n", - (unsigned long) SCM_UNPACK (cell)); - abort (); - } -#endif /* SCM_DEBUG_MARKING_API */ - + scm_i_cell_validation_already_running = 0; /* re-enable */ } }