unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Neil Jerram" <neiljerram@googlemail.com>
To: "Andy Wingo" <wingo@pobox.com>
Cc: hanwen@xs4all.nl, guile-devel@gnu.org
Subject: Re: Goops & Valgrind
Date: Sun, 4 Jan 2009 21:01:03 +0000	[thread overview]
Message-ID: <49dd78620901041301t7ed8424ag8fcce2e621eb5fea@mail.gmail.com> (raw)
In-Reply-To: <m3r63js18b.fsf@pobox.com>

2009/1/4 Andy Wingo <wingo@pobox.com>:
> Hi,
>
> Sorry for the spam, but I'm going through some backlog that I didn't
> have the resources to deal with. Has this issue been addressed?
>
> Andy
>
> On Sun 14 Sep 2008 14:06, "Neil Jerram" <neiljerram@googlemail.com> writes:
>
>> 2008/9/12 Andy Wingo <wingo@pobox.com>:
>>> On Thu 11 Sep 2008 23:06, "Neil Jerram" <neiljerram@googlemail.com> writes:
>>>
>>>> Are you sure?  Surely that would require a call somewhere to
>>>> scm_alloc_struct() with n_extra = 0, and I can't see any of those.
>>>
>>> I'm sure -- goops.c:1541 in master. Doesn't go through scm_alloc_struct
>>> at all.
>>
>> Thanks, I see now.
>>
>>>> Also, is Mikael right with his error #1?  I'm thinking not, because I
>>>> believe that instances are structs too, so surely it's OK to call
>>>> SCM_STRUCT_DATA (x)[...] on them?
>>>
>>> I can't recall the mail at the moment. Please reply if you want me to
>>> dig through this -- I'm happy to do so. But instances are structs, yes.
>>> Calling SCM_STRUCT_DATA (x)[] does work. You have to know how many
>>> fields there are, though -- you get that from the vtable.
>>
>> Agreed.  So I think the right fix here is along the lines of your
>> second suggestion:
>>
>>> #define SCM_NUMBER_OF_FIELDS(x) (SCM_STRUCT_VTABLE (x)[scm_si_nfields])
>>
>> I propose specifically that we:
>>
>> - remove the SCM_NUMBER_OF_SLOTS macro - because it's never been
>> right, so there can't be external code relying on it
>>
>> - change scm_sys_fast_slot_ref and scm_sys_fast_slot_set_x to say
>>
>>   i = scm_to_unsigned_integer (index, 0, SCM_SLOT (SCM_CLASS_OF (obj),
>> scm_si_nfields) - 1);
>>
>> OK?  (There are way too many goops/struct macros already, so let's not
>> introduce another one!)
>>
>> One last concern, though: I didn't understand what you meant by "would
>> probably have a different purpose".  (In:
>>
>>> assumption. The other would be to use a different definition of
>>> SCM_NUMBER_OF SLOTS, which would probably have a different purpose:
>>
>> )
>>
>> Regards,
>>      Neil
>
> --
> http://wingolog.org/
>

Sorry, no.  I have the code change ready to go now; do you by any
chance have a convenient test for this?

       Neil




  reply	other threads:[~2009-01-04 21:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-16  5:15 Goops & Valgrind Han-Wen Nienhuys
2008-08-18 15:50 ` Ludovic Courtès
2008-08-19  8:58   ` Han-Wen Nienhuys
2008-08-18 18:58 ` Andy Wingo
2008-08-22 19:00   ` Ludovic Courtès
2008-09-11 21:06   ` Neil Jerram
2008-09-12 19:22     ` Andy Wingo
2008-09-14 12:06       ` Neil Jerram
2008-09-14 17:03         ` Neil Jerram
2009-01-04 12:29         ` Andy Wingo
2009-01-04 21:01           ` Neil Jerram [this message]
2009-01-04 23:36             ` Neil Jerram
2008-09-16  7:25     ` Mikael Djurfeldt
2008-09-16  9:29       ` Neil Jerram
2008-08-19 11:53 ` Mikael Djurfeldt
2008-08-19 15:19   ` Han-Wen Nienhuys

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=49dd78620901041301t7ed8424ag8fcce2e621eb5fea@mail.gmail.com \
    --to=neiljerram@googlemail.com \
    --cc=guile-devel@gnu.org \
    --cc=hanwen@xs4all.nl \
    --cc=wingo@pobox.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).