From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Neil Jerram" Newsgroups: gmane.lisp.guile.devel Subject: Re: Goops & Valgrind Date: Sun, 4 Jan 2009 21:01:03 +0000 Message-ID: <49dd78620901041301t7ed8424ag8fcce2e621eb5fea@mail.gmail.com> References: <49dd78620809111406s7a4c1808n64290c14df5d63d8@mail.gmail.com> <49dd78620809140506k5f66b7f9i243c4bc9727130eb@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231102879 18775 80.91.229.12 (4 Jan 2009 21:01:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Jan 2009 21:01:19 +0000 (UTC) Cc: hanwen@xs4all.nl, guile-devel@gnu.org To: "Andy Wingo" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 04 22:02:29 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 1LJa79-0000Ua-Aj for guile-devel@m.gmane.org; Sun, 04 Jan 2009 22:02:28 +0100 Original-Received: from localhost ([127.0.0.1]:37716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJa5u-00044Q-2E for guile-devel@m.gmane.org; Sun, 04 Jan 2009 16:01:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJa5r-00044L-1R for guile-devel@gnu.org; Sun, 04 Jan 2009 16:01:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJa5q-000449-3W for guile-devel@gnu.org; Sun, 04 Jan 2009 16:01:06 -0500 Original-Received: from [199.232.76.173] (port=36721 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJa5q-000446-1L for guile-devel@gnu.org; Sun, 04 Jan 2009 16:01:06 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.152]:19128) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LJa5p-00031N-AV for guile-devel@gnu.org; Sun, 04 Jan 2009 16:01:05 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so2689742fgb.30 for ; Sun, 04 Jan 2009 13:01:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=0on4MR2vsYItg453DOHCb06Lps/ER4/ZMWsY5Dz/62I=; b=Sw0zB8XbVzWiSCgfOsPJDbBcTkzGoSlxCNrq6G6J/u/o1Ja0urFcoS7FHCfTGbCy03 h+1h2cEI1ztvPcao48eFLlIo6oCdWEhlE+fwl+k6/ivZ49aBxN4+jNhs26BsVkX7DY9b HYqYlv6mP1oEUVNcdpVVfQZBKS23bNOA5rr1c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=f2pzFQiYK6On4NIHqrAmn1rZc/gM4Anl5x5ulk8NGsG5u2J9FyP8eQSWNOzpoxMA64 d4UZvjxg++Z4fy4HYfCs2qLJ/Ml1aXUmpivRc2CiNHgkvE+uvK7GOV+z2L67i3RIpV++ 3HkO3dEXqaGL0X3Ydw0DV5nkA5uqVRIkkekPI= Original-Received: by 10.86.76.20 with SMTP id y20mr11779095fga.37.1231102863146; Sun, 04 Jan 2009 13:01:03 -0800 (PST) Original-Received: by 10.86.74.2 with HTTP; Sun, 4 Jan 2009 13:01:03 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:7956 Archived-At: 2009/1/4 Andy Wingo : > 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" writes: > >> 2008/9/12 Andy Wingo : >>> On Thu 11 Sep 2008 23:06, "Neil Jerram" 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