From patchwork Wed Apr 9 16:13:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Wingo X-Patchwork-Id: 464 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 5042B36005B for ; Wed, 9 Apr 2014 09:15:09 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14314964) id 0DEF110CD5A3; Wed, 9 Apr 2014 09:15:09 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id DD18210F5201 for ; Wed, 9 Apr 2014 09:15:08 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=oNiFOMNVdg5f5TK0Jmkh7wbl62XpJ4w dakzEZ2RcFvRTZ9CN3pGS7zKTn5g/fEP8rI3ItrvUgHTTevW0HeCbdJjbFpcMucM oUAChuZn2uUWRStcQgkl/Emd/UtLV2O13dI6j7mlPaEfBygFVeoSUZLNgpj3zFzp Z3dSArxrILDU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=C501PCWcftg9D6Gj60RCplWgtNs=; b=AhURY hjsA61qYj8JVzd7dMhgpxrTgG91xv7ky+WJu/UQYXaP9oH2isrM3V+odMI7XeUu7 kc0omCiidj7IO314idf9FqlF8yudrAAz0vERCOFO+Q5ShkQpQJCMI2peQFPvi2VH ODLhk2gtoYs/QayBWq2ZokxYQW4656xaenkCrU= Received: (qmail 7731 invoked by alias); 9 Apr 2014 16:14:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 7657 invoked by uid 89); 9 Apr 2014 16:14:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=no version=3.3.2 X-HELO: sasl.smtp.pobox.com Received: from a-pb-sasl-quonix.pobox.com (HELO sasl.smtp.pobox.com) (208.72.237.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Apr 2014 16:14:25 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 87CF411064; Wed, 9 Apr 2014 12:14:23 -0400 (EDT) Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 7E2FD11063; Wed, 9 Apr 2014 12:14:23 -0400 (EDT) Received: from localhost.localdomain (unknown [88.160.190.192]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 028BF1105B; Wed, 9 Apr 2014 12:14:20 -0400 (EDT) From: Andy Wingo To: gdb-patches@sourceware.org Cc: Andy Wingo Subject: [PATCH 8/9] Remove useless Guile SMOB marking functions Date: Wed, 9 Apr 2014 18:13:47 +0200 Message-Id: <1397060028-18158-9-git-send-email-wingo@igalia.com> In-Reply-To: <1397060028-18158-1-git-send-email-wingo@igalia.com> References: <1397060028-18158-1-git-send-email-wingo@igalia.com> X-Pobox-Relay-ID: 02E860C6-C002-11E3-99A5-873F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-DH-Original-To: gdb@patchwork.siddhesh.in * gdb/guile/scm-breakpoint.c: * gdb/guile/scm-exception.c: * gdb/guile/scm-iterator.c: * gdb/guile/scm-objfile.c: * gdb/guile/scm-pretty-print.c: * gdb/guile/scm-symtab.c: * gdb/guile/scm-type.c: * gdb/guile/scm-value.c: Remove useless SMOB mark functions -- the SMOB data for all of these is allocated using scm_gc_malloc, so it is automatically marked. --- gdb/guile/scm-breakpoint.c | 14 -------------- gdb/guile/scm-exception.c | 12 ------------ gdb/guile/scm-iterator.c | 13 ------------- gdb/guile/scm-objfile.c | 14 -------------- gdb/guile/scm-pretty-print.c | 29 ----------------------------- gdb/guile/scm-symtab.c | 11 ----------- gdb/guile/scm-type.c | 11 ----------- gdb/guile/scm-value.c | 13 ------------- 8 files changed, 117 deletions(-) diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c index a66b82e..fbbd81b 100644 --- a/gdb/guile/scm-breakpoint.c +++ b/gdb/guile/scm-breakpoint.c @@ -70,19 +70,6 @@ static SCM internal_keyword; /* Administrivia for breakpoint smobs. */ -/* The smob "mark" function for . */ - -static SCM -bpscm_mark_breakpoint_smob (SCM self) -{ - breakpoint_smob *bp_smob = (breakpoint_smob *) SCM_SMOB_DATA (self); - - /* We don't mark containing_scm here. It is just a backlink to our - container, and is gc'protected until the breakpoint is deleted. */ - - return bp_smob->stop; -} - /* The smob "free" function for . */ static size_t @@ -1177,7 +1164,6 @@ gdbscm_initialize_breakpoints (void) { breakpoint_smob_tag = gdbscm_make_smob_type (breakpoint_smob_name, sizeof (breakpoint_smob)); - scm_set_smob_mark (breakpoint_smob_tag, bpscm_mark_breakpoint_smob); scm_set_smob_free (breakpoint_smob_tag, bpscm_free_breakpoint_smob); scm_set_smob_print (breakpoint_smob_tag, bpscm_print_breakpoint_smob); diff --git a/gdb/guile/scm-exception.c b/gdb/guile/scm-exception.c index 316f0b4..3b65b55 100644 --- a/gdb/guile/scm-exception.c +++ b/gdb/guile/scm-exception.c @@ -98,17 +98,6 @@ static unsigned long gdbscm_exception_count = 0; /* Administrivia for exception smobs. */ -/* The smob "mark" function for . */ - -static SCM -exscm_mark_exception_smob (SCM self) -{ - exception_smob *e_smob = (exception_smob *) SCM_SMOB_DATA (self); - - scm_gc_mark (e_smob->key); - return e_smob->args; -} - /* The smob "print" function for . */ static int @@ -661,7 +650,6 @@ gdbscm_initialize_exceptions (void) { exception_smob_tag = gdbscm_make_smob_type (exception_smob_name, sizeof (exception_smob)); - scm_set_smob_mark (exception_smob_tag, exscm_mark_exception_smob); scm_set_smob_print (exception_smob_tag, exscm_print_exception_smob); gdbscm_define_functions (exception_functions, 1); diff --git a/gdb/guile/scm-iterator.c b/gdb/guile/scm-iterator.c index 080339b..0bbca43 100644 --- a/gdb/guile/scm-iterator.c +++ b/gdb/guile/scm-iterator.c @@ -107,18 +107,6 @@ itscm_set_iterator_smob_progress_x (iterator_smob *i_smob, SCM progress) /* Administrivia for iterator smobs. */ -/* The smob "mark" function for . */ - -static SCM -itscm_mark_iterator_smob (SCM self) -{ - iterator_smob *i_smob = (iterator_smob *) SCM_SMOB_DATA (self); - - scm_gc_mark (i_smob->object); - scm_gc_mark (i_smob->progress); - return i_smob->next_x; -} - /* The smob "print" function for . */ static int @@ -358,7 +346,6 @@ gdbscm_initialize_iterators (void) { iterator_smob_tag = gdbscm_make_smob_type (iterator_smob_name, sizeof (iterator_smob)); - scm_set_smob_mark (iterator_smob_tag, itscm_mark_iterator_smob); scm_set_smob_print (iterator_smob_tag, itscm_print_iterator_smob); gdbscm_define_functions (iterator_functions, 1); diff --git a/gdb/guile/scm-objfile.c b/gdb/guile/scm-objfile.c index 693d404..34ed773 100644 --- a/gdb/guile/scm-objfile.c +++ b/gdb/guile/scm-objfile.c @@ -59,19 +59,6 @@ ofscm_objfile_smob_pretty_printers (objfile_smob *o_smob) /* Administrivia for objfile smobs. */ -/* The smob "mark" function for . */ - -static SCM -ofscm_mark_objfile_smob (SCM self) -{ - objfile_smob *o_smob = (objfile_smob *) SCM_SMOB_DATA (self); - - /* We don't mark containing_scm here. It is just a backlink to our - container, and is gc-protected until the objfile is deleted. */ - - return o_smob->pretty_printers; -} - /* The smob "print" function for . */ static int @@ -396,7 +383,6 @@ gdbscm_initialize_objfiles (void) { objfile_smob_tag = gdbscm_make_smob_type (objfile_smob_name, sizeof (objfile_smob)); - scm_set_smob_mark (objfile_smob_tag, ofscm_mark_objfile_smob); scm_set_smob_print (objfile_smob_tag, ofscm_print_objfile_smob); gdbscm_define_functions (objfile_functions, 1); diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c index f25eac3..dbdd749 100644 --- a/gdb/guile/scm-pretty-print.c +++ b/gdb/guile/scm-pretty-print.c @@ -121,18 +121,6 @@ static SCM ppscm_string_string; /* Administrivia for pretty-printer matcher smobs. */ -/* The smob "mark" function for . */ - -static SCM -ppscm_mark_pretty_printer_smob (SCM self) -{ - pretty_printer_smob *pp_smob = (pretty_printer_smob *) SCM_SMOB_DATA (self); - - scm_gc_mark (pp_smob->name); - scm_gc_mark (pp_smob->enabled); - return pp_smob->lookup; -} - /* The smob "print" function for . */ static int @@ -248,19 +236,6 @@ gdbscm_set_pretty_printer_enabled_x (SCM self, SCM enabled) /* Administrivia for pretty-printer-worker smobs. These are created when a matcher recognizes a value. */ -/* The smob "mark" function for . */ - -static SCM -ppscm_mark_pretty_printer_worker_smob (SCM self) -{ - pretty_printer_worker_smob *w_smob - = (pretty_printer_worker_smob *) SCM_SMOB_DATA (self); - - scm_gc_mark (w_smob->display_hint); - scm_gc_mark (w_smob->to_string); - return w_smob->children; -} - /* The smob "print" function for . */ static int @@ -1096,16 +1071,12 @@ gdbscm_initialize_pretty_printers (void) pretty_printer_smob_tag = gdbscm_make_smob_type (pretty_printer_smob_name, sizeof (pretty_printer_smob)); - scm_set_smob_mark (pretty_printer_smob_tag, - ppscm_mark_pretty_printer_smob); scm_set_smob_print (pretty_printer_smob_tag, ppscm_print_pretty_printer_smob); pretty_printer_worker_smob_tag = gdbscm_make_smob_type (pretty_printer_worker_smob_name, sizeof (pretty_printer_worker_smob)); - scm_set_smob_mark (pretty_printer_worker_smob_tag, - ppscm_mark_pretty_printer_worker_smob); scm_set_smob_print (pretty_printer_worker_smob_tag, ppscm_print_pretty_printer_worker_smob); diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c index 2d09da3..8910973 100644 --- a/gdb/guile/scm-symtab.c +++ b/gdb/guile/scm-symtab.c @@ -386,16 +386,6 @@ gdbscm_symtab_static_block (SCM self) /* Administrivia for sal (symtab-and-line) smobs. */ -/* The smob "mark" function for . */ - -static SCM -stscm_mark_sal_smob (SCM self) -{ - sal_smob *s_smob = (sal_smob *) SCM_SMOB_DATA (self); - - return s_smob->symtab_scm; -} - /* The smob "free" function for . */ static size_t @@ -702,7 +692,6 @@ gdbscm_initialize_symtabs (void) scm_set_smob_print (symtab_smob_tag, stscm_print_symtab_smob); sal_smob_tag = gdbscm_make_smob_type (sal_smob_name, sizeof (sal_smob)); - scm_set_smob_mark (sal_smob_tag, stscm_mark_sal_smob); scm_set_smob_free (sal_smob_tag, stscm_free_sal_smob); scm_set_smob_print (sal_smob_tag, stscm_print_sal_smob); diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 4e09cbc..7a9cb68 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -401,16 +401,6 @@ save_objfile_types (struct objfile *objfile, void *datum) /* Administrivia for field smobs. */ -/* The smob "mark" function for . */ - -static SCM -tyscm_mark_field_smob (SCM self) -{ - field_smob *f_smob = (field_smob *) SCM_SMOB_DATA (self); - - return f_smob->type_scm; -} - /* The smob "print" function for . */ static int @@ -1469,7 +1459,6 @@ gdbscm_initialize_types (void) field_smob_tag = gdbscm_make_smob_type (field_smob_name, sizeof (field_smob)); - scm_set_smob_mark (field_smob_tag, tyscm_mark_field_smob); scm_set_smob_print (field_smob_tag, tyscm_print_field_smob); gdbscm_define_integer_constants (type_integer_constants, 1); diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index 70cc7d0..f0a0b4d 100644 --- a/gdb/guile/scm-value.c +++ b/gdb/guile/scm-value.c @@ -120,18 +120,6 @@ vlscm_forget_value_smob (value_smob *v_smob) v_smob->next->prev = v_smob->prev; } -/* The smob "mark" function for . */ - -static SCM -vlscm_mark_value_smob (SCM self) -{ - value_smob *v_smob = (value_smob *) SCM_SMOB_DATA (self); - - scm_gc_mark (v_smob->address); - scm_gc_mark (v_smob->type); - return v_smob->dynamic_type; -} - /* The smob "free" function for . */ static size_t @@ -1486,7 +1474,6 @@ gdbscm_initialize_values (void) { value_smob_tag = gdbscm_make_smob_type (value_smob_name, sizeof (value_smob)); - scm_set_smob_mark (value_smob_tag, vlscm_mark_value_smob); scm_set_smob_free (value_smob_tag, vlscm_free_value_smob); scm_set_smob_print (value_smob_tag, vlscm_print_value_smob); scm_set_smob_equalp (value_smob_tag, vlscm_equal_p_value_smob);