chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix #1620 by ignoring captured state of re


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix #1620 by ignoring captured state of replaced variables
Date: Fri, 5 Jul 2019 09:08:56 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Jul 05, 2019 at 09:13:36AM +0300, megane wrote:
> I reduced this case to this:
> 
>   (define (foo bindings)
>     (define (append-map proc lst1)
>       (if lst1
>           (proc 1)
>           (proc 1 2)))
>     (append-map (lambda (b a) (begin)) bindings))
> 
> Error: ../fail.scm:5: proc: procedure `proc' called with wrong number of
> arguments

Wow, my mind is blown.  Great job at finding this!  This seems to be
exactly what is happening inside the compiler after removing the
(not captured) test, but like you show here it doesn't have anything
to do with that test, it can be triggered separately too.

I created a ticket for it: https://bugs.call-cc.org/ticket/1630

> This seems to be a separate optimizer issue as it triggers with 5.1.0rc1
> and 4.13.0 too.

I think you're right, this has nothing to do with the patch.  We'll need
to fix this bug first, I think, and then we can try again with removing
the (not captured) check.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

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