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: Evan Hanson
Subject: Re: [Chicken-hackers] [PATCH 1/2] Add distinct boolean subtypes for true and false
Date: Sun, 2 Feb 2014 09:02:58 +1300

Thanks Peter!

On 2014-02-01 17:35, Peter Bex wrote:
> 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).

Yes, I believe this is the case, and it's why I left false in the
`always-true` check, despite the obvious wrongness of that. As you say,
this will already happen for other constant types, so I figured the
patch should maintain the status quo, and we'd address the
overly-optimistic pruning in a separate changeset.

Thanks,

Evan



reply via email to

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