[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] testcase -strict-types
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] testcase -strict-types |
Date: |
Sun, 24 Mar 2013 23:07:42 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Sun, Mar 24, 2013 at 10:59:16PM +0100, Moritz Heidkamp wrote:
> Hi Jörg,
>
> The "Note" points to the problem I think: The specializer seems to just
> replace your null? check with #t as can be seen when compiling the
> program like this:
>
> $ csc -debug 3 -strict-types strcttps.scm
>
> The output contains this:
>
> (if #t (k225 'gaga) (k225 foobar8))
>
> I'm not sure how -strict-types could lead to this result. Maybe the type
> declaration for null? is flawed somehow?
As I understand it, strict-types declares variables to never change
their types. So once it's looked at the initial declaration of the
variable, it assigns it a type of null, and then it can never change.
-strict-types assume variable do not change their type
The set! would change the type from NULL to LIST (or maybe PAIR),
invalidating that assumption.
Cheers,
Peter
--
http://www.more-magic.net
- [Chicken-hackers] testcase -strict-types, Jörg F . Wittenberger, 2013/03/24
- Re: [Chicken-hackers] testcase -strict-types, John Cowan, 2013/03/24
- Re: [Chicken-hackers] testcase -strict-types, Moritz Heidkamp, 2013/03/24
- Re: [Chicken-hackers] testcase -strict-types,
Peter Bex <=
- Re: [Chicken-hackers] testcase -strict-types, Moritz Heidkamp, 2013/03/24
- Re: [Chicken-hackers] testcase -strict-types, Jörg F . Wittenberger, 2013/03/25
- Re: [Chicken-hackers] testcase -strict-types, Moritz Heidkamp, 2013/03/25
- Re: [Chicken-hackers] testcase -strict-types, Jörg F . Wittenberger, 2013/03/25
- Re: [Chicken-hackers] testcase -strict-types, Moritz Heidkamp, 2013/03/25
- Re: [Chicken-hackers] testcase -strict-types, Peter Bex, 2013/03/25
- Re: [Chicken-hackers] testcase -strict-types, Felix, 2013/03/30
- Re: [Chicken-hackers] testcase -strict-types, Peter Bex, 2013/03/30
- Re: [Chicken-hackers] testcase -strict-types, Felix, 2013/03/30
- Re: [Chicken-hackers] testcase -strict-types, Peter Bex, 2013/03/30