[Top][All Lists]

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

Re: [Chicken-hackers] [PATCH] Mostly fix #1604

From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Mostly fix #1604
Date: Wed, 29 May 2019 10:36:44 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, May 29, 2019 at 10:39:54AM +0300, megane wrote:
> Consider the case (= a b c). If the C_and in the rewrite short-circuits
> then 'c' is never evaluated, right?

Ah, good observation.  That might be a problem.

> Testing this indicates this is not an issue. Playing with gcc
> optimization flags didn't drop the evaluation of the 'c' node either.

I don't understand.  If you do (= 1 2 (error "hi")), it should raise
the exception.  Of course for "error" specifically it's not an issue
because "error" is not inlineable.

> I also tested that the lets in the rewrite can be dropped altogether.
> The arguments are bound to variables by the CPS conversion anyway.
> There's no duplicate evaluation.

How do you enforce that?  If there's an inlineable call it doesn't
need to be bound to a variable.  Something like (set! a 1) would be

> If you look at the output of -debug 5 you see that the next optimization
> iteration drops the 'let's generated by the rewrite.

You mean with the change you made?


Attachment: signature.asc
Description: PGP signature

reply via email to

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