Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: Doug Evans <xdje42@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 6/9] Remove Guile GDB object property mechanism
Date: Thu, 17 Apr 2014 09:54:00 -0000	[thread overview]
Message-ID: <878ur4s2mb.fsf@igalia.com> (raw)
In-Reply-To: <m31tx2tkr5.fsf@sspiff.org> (Doug Evans's message of "Sat, 12 Apr	2014 12:23:26 -0700")

On Sat 12 Apr 2014 21:23, Doug Evans <xdje42@gmail.com> writes:

> Andy Wingo <wingo@igalia.com> writes:
>
>> * gdb/guile/guile-internal.h: Remove scm_gsmob / GDB_SMOB_HEAD base
>>   type; it only served as something to which object properties could be
>>   attached: a use case already served by Guile's own object properties.
>>   (gdbscm_init_gsmob, gdbscm_mark_gsmob, gdbscm_mark_chained_gsmob)
>>   (gdbscm_mark_eqable_gsmob): Remove these now-unneeded functions.
>>
>> * gdb/guile/scm-gsmob.c (gdbscm_init_gsmob, gdbscm_mark_gsmob)
>>   (gdbscm_mark_chained_gsmob, gdbscm_mark_eqable_gsmob): Remove.
>>   (gdbscm_gsmob_property, gdbscm_set_gsmob_property_x)
>>   (gdbscm_gsmob_has_property_p, add_property_name)
>>   (gdbscm_gsmob_properties): Remove these public interfaces, and remove
>>   them from gsmob_functions.
>>
>> * gdb/guile/scm-arch.c:
>> * gdb/guile/scm-block.c:
>> * gdb/guile/scm-breakpoint.c:
>> * gdb/guile/scm-exception.c:
>> * gdb/guile/scm-frame.c:
>> * gdb/guile/scm-iterator.c:
>> * gdb/guile/scm-lazy-string.c:
>> * gdb/guile/scm-objfile.c:
>> * gdb/guile/scm-pretty-print.c:
>> * gdb/guile/scm-symbol.c:
>> * gdb/guile/scm-symtab.c:
>> * gdb/guile/scm-type.c:
>> * gdb/guile/scm-value.c: Adapt to not include a gdb_gsmob base member,
>>   for basic gsmobs, and to not call init/mark functions.
>
> I realize I wasn't going to say anything more about changelogs, but alas
> the above is insufficient.  My understanding of community rules, and I
> can imagine there being differing opinions, is that shortcuts like this
> are not allowed.  No disagreement that some brevity would be nice, but
> IME the community frowns on it.  [More clarity on the subject would be nice.]
> Each change to each file needs to be documented.  E.g.,
>
> 	* scm-arch.c (_arch_smob): Delete member base.  All uses updated.
>
> or some such, depending on the change.

Alack.  Will fix, but what a slog...

> I started out with having a simple "aux" field in gsmobs so that 
> one could store arbitrary data with them without having to resort to
> object properties (storing data for an "object" in a global side table
> is a hack I'm not fond of).
> I think I'll go back to having just "aux".

Just my opinion, but I think this is the wrong approach.  For one, you
have to make a new API, where there is a perfectly good and
well-understood one in Guile.  Less code is better code.  You add
overhead for these properties to every object, where the vast majority
of objects will never need it.  It doesn't compose on a modular level --
you can't hide a property on an object from other modules, as you can
with `make-object-property'.  And finally, a weak lookaside table is a
semantically equivalent option, and is not bad, perf-wise.

Again, just MHO :)

Regards,

Andy


  reply	other threads:[~2014-04-17  9:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 16:14 [PATCH 0/8] Cleanups to Guile extension interface Andy Wingo
2014-04-09 16:14 ` [PATCH 2/9] Define and export Guile classes for all GDB object types Andy Wingo
2014-04-12 18:32   ` Doug Evans
2014-04-09 16:14 ` [PATCH 5/9] Rename "gsmob" in Guile interface to "gdb object" Andy Wingo
2014-04-12 18:46   ` Doug Evans
2014-04-17  9:39     ` Andy Wingo
2014-04-17  9:46       ` Eli Zaretskii
2014-04-09 16:14 ` [PATCH 3/9] Fix excess parentheses in Guile extension examples Andy Wingo
2014-04-09 16:14 ` [PATCH 4/9] Fix typos in documentation of Guile `execute' function Andy Wingo
2014-04-09 16:14 ` [PATCH 7/9] Remove Guile mark functions that don't mark anything Andy Wingo
2014-04-12 19:29   ` Doug Evans
2014-04-17  9:48     ` Andy Wingo
2014-04-20 19:34       ` Doug Evans
2014-04-22  7:40         ` Andy Wingo
2014-04-29 11:51         ` Ludovic Courtès
2014-04-09 16:14 ` [PATCH 6/9] Remove Guile GDB object property mechanism Andy Wingo
2014-04-12 19:23   ` Doug Evans
2014-04-17  9:54     ` Andy Wingo [this message]
2014-04-09 16:14 ` [PATCH 9/9] Remove a useless Guile finalizer Andy Wingo
2014-04-12 20:18   ` Doug Evans
2014-04-14 12:12     ` Ludovic Courtès
2014-04-14 21:39       ` Doug Evans
2014-04-15  9:29         ` Ludovic Courtès
2014-04-15 15:30           ` Doug Evans
2014-04-17 10:07     ` Andy Wingo
2014-04-09 16:14 ` [PATCH 8/9] Remove useless Guile SMOB marking functions Andy Wingo
2014-04-12 19:50   ` Doug Evans
2014-04-09 16:14 ` [PATCH 1/9] Allow GDB to build against unreleased Guile 2.2 Andy Wingo
2014-04-12 16:40   ` Doug Evans
2014-04-12 16:47     ` Doug Evans
2014-04-17  9:04     ` Andy Wingo
  -- strict thread matches above, loose matches on Subject: below --
2014-04-09 16:09 [PATCH 0/8] Cleanups to Guile extension interface Andy Wingo
2014-04-09 16:09 ` [PATCH 6/9] Remove Guile GDB object property mechanism Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878ur4s2mb.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=gdb-patches@sourceware.org \
    --cc=xdje42@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox