[Top][All Lists]

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

Re: [Chicken-users] valgrind - more details

From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] valgrind - more details
Date: 06 Oct 2011 17:08:23 +0200

On Oct 6 2011, Peter Bex wrote:

Furthermore: Also I changed my mind: I'm afraid numbers in Scheme are complex
enough to use a real parser to read them.

I agree.  There's pure Scheme code for parsing numbers syntax in trunk
of the numbers egg (and the latest release has it too).  It's not very
simple either, but it doesn't have any dependencies.

When I posted my patches to fix some of the more esoteric syntax details
in Chicken, I initially also tried my Scheme code, but it is about twice
as slow as this C code, that's why I decided against switching.

This sound like a good case to try

Also, this code needs to be callable from C because decode_literal()
relies on it. (but that could maybe be worked around)

Did I admit in that other mail that I did only compile, but not test
this patch?  I'd better had done so!

In fact the first valgrind complain is gone. "42" without the quotes
is now a valid Scheme program wrt. the valgrind report.

However let me reiterate: it does not fix valgrind's compaint.

Wrong I was.

I think the patch is a good improvement in readability of the core code,
so why not put it in? (of course after fixing the while/if mistake)

So let's go for it.

The attached diff is against git master as of 5p.m. Berlin.

However the only thing, which this patch does wrt. program logic
is to avoid running afoul of a possibly missing end marker in the
strlen call.  This cast some doubt that the code might still need


Attachment: cleanup.diff
Description: cleanup.diff

reply via email to

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