chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH 1/2] Add distinct boolean subtypes for true


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 1/2] Add distinct boolean subtypes for true and false
Date: Sat, 1 Feb 2014 17:35:49 +0100
User-agent: Mutt/1.4.2.3i

On Thu, Jan 30, 2014 at 09:36:46PM +1300, Evan Hanson wrote:
> Hi all, here are two patches.
> 
> The first is for #847 and implements option #7 from Peter's list of
> possible fixes in that ticket, adding support for distinct boolean types
> to the scrutinizer.

Hi Evan,

Thanks for this great improvement!  I noticed only one small thing,
and that's that always-true returns #f for 'true, which seems wrong.
However, when I fix it using the attached patch (which includes a test),
compiling CHICKEN itself shows a shitload of warnings about #t being
always true for global flags.  For example, in compiler.scm there's a
global called first-analysis which is defined to #t, and is not hidden.
The batch-driver.scm code set!s it to #f after the first analysis pass.

This suggests to me that in some cases the compiler may be too
aggressively optimizing away some checks in separate compilation of
non-module code (as it would also do this in the current situation when
first-analysis would be defined to a number).  This could potentially
cause some real trouble, like for example in ticket #1067 (though this
variable should be detected as being set! so it should not trigger the
optimization).

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: true-is-always-true.patch
Description: Text document


reply via email to

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