chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH][5] Fix chicken-profile


From: Peter Bex
Subject: [Chicken-hackers] [PATCH][5] Fix chicken-profile
Date: Sat, 4 Jul 2015 15:23:16 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi all,

As Arthur Maciel found out, chicken-profile still uses "remove",
which we have killed with the removal of srfi-1 from core.
The mini-srfi-1 doesn't contain it.

There are two ways to fix it: add "remove" to mini-srfi-1, or
rewrite the predicate to the negated version.  I decided not
to add "remove" to mini-srfi-1, because a) it is supposed to stay
"mini", so it should in principle have less, not more and b)
the other core uses of "remove" have already been rewritten in
the same way.

The attached patch negates the predicate and avoids filtering altogether
when -no-unused was not supplied.  I've of course tested it on
a simple example file, and it seems to work just fine.  I don't know
when "count" would be false (from a quick study of ##sys#finish-profile
in profile.scm, this simply cannot happen), so I removed that check.
The rest of the chicken-profile code can't handle #f counts either:
it simply raises an exception elsewhere if I craft a file with #f in
the call count position.

I've also replaced the [] style with () in the surrounding code, and
added Arthur to the Acknowledgements because he's been very helpful
with testing some numbers stuff and he prompted me to write about the
CHICKEN GC on my blog, among other things.

Cheers,
Peter

Attachment: 0001-Replace-calls-to-deleted-remove-with-filter-in-chick.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]